This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb internal functionality


I do not know if the following is helpful, but on of my colleagues just helped
set me up with debugging a custom avr board with JTAG and gdb.

Here are some of the relevant commands and info:

to program and set up the connection:
  avarice --erase --program --file irrigation.elf --mkI \
     --jtag /dev/ttyUSB0 --jtag-bitrate 250KHz :4242

to start gdb:
  avr-gdb --batch --quiet -x test.2.exec test_prog.elf

The test.2.exec file looks like:

  target remote localhost:4242

  break 17
  comm 1
  set adc_data=850
  #printf "adc_data=%d,", adc_data
  continue
  end

  break 28
  comm 2
  printf "adc_data=%d\n", adc_data
  printf "    PASSED!\n"
  quit
  end

  break 85
  comm 3
  printf "adc_data=%d\n", adc_data
  printf "    FAILED!\n"
  quit
  end

  continue

This sets a temp break point to set one of the variables, and the other two
break points are set up to trap the correct and failed tests in a simple
regression test.

Hope that helps, but your millage may vary...

  EBo --


raja.saleru@iap-online.com said:

> Hi,
> 
> I would like to know more of GDB internals especially the control flow and
> functionality for the following gdb commands. For ex. the development
> environment include gdb on cygwin environment, which is connected to
> OpenOCD, which inturn connects to ARM target. Any information on this
> would be very helpful.
> 
> 1. target remote host:port
> 2. stepi
> 3. contrinue
> 4. break linenum
> 5. delete bpnum
> 6. watch expression
> 7. set/read register value
> 8. read/write memory
> 9. quit
> 10. monitor reset
> 
> Thanks in Advance
> Raja Saleru
> 



-- 




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]