How does a debugger work ? is there anything else besides gdb ? - Page 1
Forum section: electronics / general

author: legacy
author_rank: Super Contributor
timestamp: August 10, 2014, 10:22:58 am
content: removed

author: bingo600
author_rank: Super Contributor
timestamp: August 12, 2014, 07:00:51 pm
content: You are aware of OpenOCD aren't you ?If your SoC has JTAG(EJTAG) pins there are many people who has used OOCD (with GDB) for debugging mips/Bingo

author: westfw
author_rank: Super Contributor
timestamp: August 13, 2014, 06:44:36 am
content: QuoteYou know, EVERYTHING is going to "look like" gdb-stub, because gdb-stub is a fine example of how to get the information needed for debugging out of a chip. You can either do that in a software stub (exactly like gdb-stub), or you can implement some other communications mechanism to get similar data out of your chip and onto a host system (Like ARVAICE does for AVRs via various Atmel Debuggers, or mspdebug does for msp430 chips, or openOCD does for ARM's debug implementation.)That assumes that you've implemented SOME sort of debugging capability on your FPGA design. Always a good idea, but not at all trivial!Alternately, you can go back in time and look at some of the "debug monitors" and techniques used on ancient chips like the z80 (based on breakpoint and singlestep interrupts, and HW things like stopping the clock or freezing the instruction bus.) (actually, I sort-of miss singlestep interrupts...)

author: nctnico
author_rank: Super Contributor
timestamp: August 13, 2014, 08:44:00 pm
content: Why not use a software implementation? Debugging and single stepping is often implemented by replacing an instruction by one which causes an exception. When the exception is called update the debug information. You can run the debugger host software from a timer interrupt to have a transparent background process.

author: westfw
author_rank: Super Contributor
timestamp: August 14, 2014, 01:13:06 am
content: So I'm not sure I understand the original question. Are you looking for a simpler replacement for gdb-stub and/or it's "communication protocol" (which I think would be really hard to find), or are you looking for a simpler "front end" to make use of that protocol? (gdb being "contaminated" with bulky stuff like source-level debugging, elf file processing (just Gnu's object file library (BFD?) is complex stuff!), symbols, and so on.) Things would be vastly simpler if you're willing to stick to assembly-language and absolute addresses...(Hmm. DEC DDT! Fond memories!)

author: nctnico
author_rank: Super Contributor
timestamp: August 17, 2014, 07:42:20 pm
content: Did you look at the picoblaze?http://www.picoblaze.info/tools.html

author: miguelvp
author_rank: Super Contributor
timestamp: September 14, 2014, 03:51:18 am
content: That's what PSoC 4 and PSoC 5LP uses, works well for them.Pretty much is an ARM thingEdit:http://en.wikipedia.org/wiki/Joint_Test_Action_Group#Serial_Wire_DebugEdit 2:I was able to convert my pioneer kit to a full programmer debugger compatible with SWD without the need to purchase the Cypress MiniProg 3http://www.element14.com/community/thread/27067?start=15&tstart=0

author: westfw
author_rank: Super Contributor
timestamp: September 15, 2014, 04:03:46 am
content: I dunno. SWD seems to be used largely as a mechanism to get to the same data and control registers that you would have accessed via JTAG or some more proprietary debug connections (BDM for freescale, spi-bi-wire for msp430, debugWire for AVR.) probably better just because of more standardization, but ... license issues?

author: paulie
author_rank: Frequent Contributor
timestamp: September 16, 2014, 12:49:39 pm
content: Quote from: legacy on September 16, 2014, 10:11:32 amI agree. At least for STM32 and STM8. Even after getting STlink SWD and SWIM up and running I made the mistake of ordering a JTAG clone. It cost 3x more, definitely slower, more wiring, and less software friendly. Big mistake."Please be seated. The future will be taking place immediately."

author: Rasz
author_rank: Super Contributor
timestamp: December 07, 2014, 12:19:33 am
content: Quote from: legacy on September 16, 2014, 10:14:16 amif all you have is a hammer ..

author: Rasz
author_rank: Super Contributor
timestamp: December 08, 2014, 02:55:39 am
content: Quote from: legacy on December 07, 2014, 09:50:33 am>WHY there is a DSP mounted on the debug-cable

author: Rasz
author_rank: Super Contributor
timestamp: December 08, 2014, 11:37:32 am
content: Quote from: legacy on December 08, 2014, 10:26:55 amreally? am I overreacting? you trolling? or are you this slow?Read it slowly: AD has no "normal" micro-controllers, all they deal with is DSP and niche radio/adc stuff, thus the only thing they could shove into their cable was a $20 200 ball BGA DSP aka hammer while competitors 'make do' with $2 mcus (ST) .

author: coppice
author_rank: Super Contributor
timestamp: December 08, 2014, 12:55:52 pm
content: Quote from: Rasz on December 08, 2014, 11:37:32 amWhether I read that fast or slow its not entirely true. ADI make various microcontrollers, where the focus of those devices is ADIs analogue stuff rather than the controller itself. However, in various applications they go head to head against the mainstream microcontroller players and win.