Author Topic: How does a debugger work ? is there anything else besides gdb ?  (Read 12843 times)

0 Members and 1 Guest are viewing this topic.

Offline legacyTopic starter

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
removed
« Last Edit: April 16, 2015, 03:20:25 pm by legacy »
 

Offline bingo600

  • Super Contributor
  • ***
  • Posts: 1987
  • Country: dk
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #1 on: August 12, 2014, 07:00:51 pm »
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
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #2 on: August 13, 2014, 06:44:36 am »
Quote
looks similar to the gdb-stub.
You 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...)
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26896
  • Country: nl
    • NCT Developments
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #3 on: August 13, 2014, 08:44:00 pm »
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.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #4 on: August 14, 2014, 01:13:06 am »
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!)
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26896
  • Country: nl
    • NCT Developments
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #5 on: August 17, 2014, 07:42:20 pm »
Did you look at the picoblaze? http://www.picoblaze.info/tools.html
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #6 on: September 14, 2014, 03:51:18 am »
That's what PSoC 4 and PSoC 5LP uses, works well for them.

Pretty much is an ARM thing

Edit: http://en.wikipedia.org/wiki/Joint_Test_Action_Group#Serial_Wire_Debug

Edit 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 3

http://www.element14.com/community/thread/27067?start=15&tstart=0
« Last Edit: September 14, 2014, 03:56:06 am by miguelvp »
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #7 on: September 15, 2014, 04:03:46 am »
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?
 

Offline paulie

  • Frequent Contributor
  • **
  • !
  • Posts: 849
  • Country: us
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #8 on: September 16, 2014, 12:49:39 pm »
i think SWD is technically better than jtag.

I 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."
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #9 on: December 07, 2014, 12:19:33 am »
today i have bought a new able: AnalogDevices ADZS-ICE-100B. It is incredible: it has a blackfin BF527 DSP on it X_X
it seems a debug processor approach, wandering how it works, more specifically WHY there is a DSP mounted on the debug-cable  :-//


if all you have is a hammer ..
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #10 on: December 08, 2014, 02:55:39 am »
ll you have is a hammer ..

about AnalogDevices ADZS-ICE-100B: what do you mean ?

>WHY there is a DSP mounted on the debug-cable
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline Rasz

  • Super Contributor
  • ***
  • Posts: 2616
  • Country: 00
    • My random blog.
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #11 on: December 08, 2014, 11:37:32 am »
yeah, why hammer ? it is working perfectly, and very efficiently, so what ?

really?  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) .
Who logs in to gdm? Not I, said the duck.
My fireplace is on fire, but in all the wrong places.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8637
  • Country: gb
Re: looking around for debuggers, is there anything else besides gdb ?
« Reply #12 on: December 08, 2014, 12:55:52 pm »
Read it slowly: AD has no "normal" micro-controllers
Whether 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf