public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Problems getting symbol information using a convenience register,
@ 2012-10-17 21:43 Luc Des Trois Maisons
  2012-10-23 19:01 ` Tom Tromey
  0 siblings, 1 reply; 2+ messages in thread
From: Luc Des Trois Maisons @ 2012-10-17 21:43 UTC (permalink / raw)
  To: gdb

Hi, not sure if this is the right list:

I'm trying to walk the stack and find any potential symbol information for 
any aligned 32 bit values.  However, I'm having a problem when I try to 
use the convenience register with the 'info symbols' command.  I poked 
around and I found that the convenience register works when set directly 
with a value, but breaks when set using a pointer dereference.  I was 
wondering if I'm just doing things the wrong way or if this is a bug. I've 
tried looking for information online, as well as searching the bug 
database for this but have thus far found nothing.

(gdb) info symbol 0xb6ca4d28
[Useful Symbol Information]
(gdb) set $pointer = $esp
(gdb) while ( *(int*)$pointer != 0xb6ca4d28)
 >set $pointer += 4
 >end
(gdb) x/x $pointer
0x6ebee064:     0xb6ca4d28
(gdb) set $dereferencePointer = *(int *)$pointer
(gdb) p/x $dereferencePointer
$103 = 0xb6ca4d28
(gdb) info symbol $dereferencePointer
No symbol matches $dereferencePointer.
(gdb) set $dereferencePointer = 0xb6ca4d28
(gdb) p/x $dereferencePointer
$104 = 0xb6ca4d28
(gdb) info symbol $dereferencePointer
[Useful symbol information]
(gdb)


Using GDB 7.5 on Linux to debug IA32 code.


If I have the wrong list, please let me know where I can find the 
appropriate channel for this type question, otherwise any help is 
appreciated.


Thanks.



Luc des Trois Maisons
Java JIT Compiler Development

Phone: 1-905-413-3916
E-mail: lmaisons@ca.ibm.com


8200 Warden Ave
Markham, ON L6G 1C7
Canada

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

* Re: Problems getting symbol information using a convenience register,
  2012-10-17 21:43 Problems getting symbol information using a convenience register, Luc Des Trois Maisons
@ 2012-10-23 19:01 ` Tom Tromey
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Tromey @ 2012-10-23 19:01 UTC (permalink / raw)
  To: Luc Des Trois Maisons; +Cc: gdb

>>>>> "Luc" == Luc Des Trois Maisons <lmaisons@ca.ibm.com> writes:

Luc> However, I'm having a problem when I try to use the convenience
Luc> register with the 'info symbols' command.  I poked around and I
Luc> found that the convenience register works when set directly with a
Luc> value, but breaks when set using a pointer dereference.

I don't have a ready explanation for the problem.
If you have a self-contained test case, file it in bugzilla.
Otherwise, I guess you could step through sym_info and see what goes
wrong.

Tom

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

end of thread, other threads:[~2012-10-23 19:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-17 21:43 Problems getting symbol information using a convenience register, Luc Des Trois Maisons
2012-10-23 19:01 ` Tom Tromey

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).