Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "EBo" <ebo@sandien.com>
To: <raja.saleru@iap-online.com>
Cc: <gdb@sourceware.org>
Subject: Re: gdb internal functionality
Date: Fri, 07 Nov 2008 12:21:00 -0000	[thread overview]
Message-ID: <twig.1226060463.97259@swcp.com> (raw)
In-Reply-To: <21449.210.143.35.19.1226044120.squirrel@www.iap-online.com>

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
> 



-- 




  reply	other threads:[~2008-11-07 12:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <33036.210.143.35.19.1225860010.squirrel@www.iap-online.com>
2008-11-07  7:49 ` raja.saleru
2008-11-07 12:21   ` EBo [this message]
2008-11-10 10:53     ` Jeremy Bennett
2008-11-07 18:22   ` Michael Snyder
2008-11-14  8:07 ` gdb load command flow raja.saleru
2008-11-14  8:13   ` Ramana Radhakrishnan
2008-11-14  9:07   ` Jeremy Bennett
     [not found] ` <59596.210.143.35.18.1226650013.squirrel@www.iap-online.com>
2008-11-26  1:28   ` gdb remote serial packet has wrong address raja.saleru
2008-11-26 18:46     ` Michael Snyder
     [not found]   ` <28893.210.143.35.18.1227662837.squirrel@www.iap-online.com>
2009-01-06 10:35     ` adding new commandline interface to gdb ? raja.saleru
2009-01-07  9:09       ` teawater
     [not found]     ` <17669.210.143.35.18.1231238130.squirrel@www.iap-online.com>
2009-01-20  8:36       ` info watch command raja.saleru
2009-01-20 13:46         ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=twig.1226060463.97259@swcp.com \
    --to=ebo@sandien.com \
    --cc=gdb@sourceware.org \
    --cc=raja.saleru@iap-online.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox