From: Richard Henderson <richard@atheist.tamu.edu>
Subject: Re: gdb
Date: Thu, 9 May 1996 11:04:39 -0500 (CDT) [thread overview]
Message-ID: <m0uHYCl-0001qJC@atheist.tamu.edu> (raw)
In-Reply-To: <9605090859.AA09338@nova.tat.physik.uni-tuebingen.de>
> my idea was just to use the actual gp value from the registers ("info reg")
> which would allow to check these addresses at least for the current subroutine
> when using breakpoints. not a really general solution but quite helpful
> for the few "disassembler sessions" I've had so far.
Two problems: (1) the disassembler cannot get hold of the registers
under gdb, and (2) it must also work when invoked under objdump in
which there are no registers and no coherant table from which to
extract the addresses.
Perhaps easier would be to have some simple macro to print a symbol
name given a gp offset. Something like
gdb> pgp -1234
$2 = {int ()} 0x140040274 <foo>
Without testing, try:
define pgp
p *((int (*))($ + $gp))
end
which would actually require you to type
gdb> p -1234
$1 = (int) -1234
gdb> pgp
$2 = {int ()} 0x123456789 <foo>
At some point, they really ought to add arguments to gdb macros.
r~
next prev parent reply other threads:[~1996-05-09 16:04 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-05-08 20:15 gdb Richard Henderson
1996-05-09 8:23 ` gdb Harald Koenig
1996-05-09 16:04 ` Richard Henderson [this message]
-- strict thread matches above, loose matches on Subject: below --
1999-08-29 0:09 gdb Larry Snyder
1999-08-30 12:07 ` gdb Max Weninger
1999-08-30 15:20 ` gdb Michal Jaegermann
1999-08-30 17:12 ` gdb Max Weninger
1999-08-30 18:19 ` gdb Wes Bauske
1999-08-30 20:15 ` gdb Michal Jaegermann
1999-08-31 8:56 ` gdb Max Weninger
[not found] <m0uM6E7-0001thC@atheist.tamu.edu>
1996-05-22 11:45 ` gdb Jim Nance
[not found] <Pine.SUN.3.91.960510085342.3960A-100000@edge.edge.net>
1996-05-17 15:56 ` gdb Harald Koenig
[not found] <Pine.LNX.3.91.960509080842.11981C-100000@linux.cs.Helsinki.FI>
1996-05-09 15:43 ` gdb Richard Henderson
[not found] <richard@atheist.tamu.edu>
1996-05-09 14:55 ` gdb Eric Youngdale
[not found] <Pine.LNX.3.91.960508210447.27170G-100000@linux.cs.Helsinki.FI>
1996-05-09 8:16 ` gdb Harald Koenig
1996-05-09 4:34 gdb David Mosberger-Tang
1996-05-09 3:47 gdb Eric Youngdale
1996-05-09 5:29 ` gdb Linus Torvalds
1996-05-08 19:07 gdb Richard Gorton
1996-05-08 18:51 gdb Craig Burley
1996-05-08 17:53 gdb David Mosberger
1996-05-08 18:16 ` gdb Linus Torvalds
[not found] <torvalds@cs.Helsinki.FI>
1996-05-08 17:19 ` gdb Eric Youngdale
1996-05-08 18:24 ` gdb Eric Youngdale
1996-05-07 14:23 gdb David Mosberger-Tang
1996-05-07 15:48 ` gdb Richard Henderson
1996-05-07 6:32 gdb Harald Koenig
1996-05-08 17:06 ` gdb Linus Torvalds
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox