unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Displaying arrays in GUD
@ 2007-04-07 17:43 Paulo J. Matos
  0 siblings, 0 replies; 2+ messages in thread
From: Paulo J. Matos @ 2007-04-07 17:43 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I'm running GUD with gdb and I'd like to know what's the best way to
display an array of int*.
I have int *foo which I would like to display, when I click on it I
only get *foo. I understand that since the array size is not known, it
cannot display anything else, but is there a way to explicitly ask for
foo[1], foo[2]... etc?

More over, I have a global state variable db which is a * to a struct.
How can I ask GUD to show it to me? I tried watch but it seems to show
the contents of the struct only after it is modified.

Cheers,

-- 
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Displaying arrays in GUD
       [not found] <mailman.1831.1175968009.7795.help-gnu-emacs@gnu.org>
@ 2007-04-09  6:38 ` Brian Elmegaard
  0 siblings, 0 replies; 2+ messages in thread
From: Brian Elmegaard @ 2007-04-09  6:38 UTC (permalink / raw)
  To: help-gnu-emacs

"Paulo J. Matos" <pocm@soton.ac.uk> writes:

> cannot display anything else, but is there a way to explicitly ask for
> foo[1], foo[2]... etc?

I use
p *(foo+1)

iirmc
-- 
Brian (remove the sport for mail)
http://www.et.web.mek.dtu.dk/Staff/be/be.html
http://www.rugbyklubben-speed.dk

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-04-09  6:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.1831.1175968009.7795.help-gnu-emacs@gnu.org>
2007-04-09  6:38 ` Displaying arrays in GUD Brian Elmegaard
2007-04-07 17:43 Paulo J. Matos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).