public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* What to do with info addr and location expressions
@ 2003-07-18 14:54 Elena Zannoni
  2003-07-18 15:30 ` Daniel Jacobowitz
  0 siblings, 1 reply; 17+ messages in thread
From: Elena Zannoni @ 2003-07-18 14:54 UTC (permalink / raw)
  To: gdb


I was looking at the tls tests, and was trying to understand why
Michael was seeing failures and I wasn't. I discovered that I was
testing the old RH gdb version which was based on a snapshot taken
befor the dwarf2loc* and dwarf2expr* files where introduced.

Turns out that we lost a whole lot of information in the 'info address'
command.

Before the change:

(gdb) info address a_thread_local
Symbol "a_thread_local" is a thread-local variable at offset 0 in the thread-local storage for `/usr/src/redhat/BUILD/gdb+dejagnu-20021129-build/gdb/testsuite/gdb.threads/tls'.
(gdb) info address another_thread_local
Symbol "another_thread_local" is a thread-local variable at offset 4 in the thread-local storage for `/usr/src/redhat/BUILD/gdb+dejagnu-20021129-build/gdb/testsuite/gdb.threads/tls'.



after the change:


(gdb) info address a_thread_local
Symbol "a_thread_local" is a variable with complex or multiple locations (DWARF2).
(gdb) info address another_thread_local
Symbol "another_thread_local" is a variable with complex or multiple locations (DWARF2).


Seems to me like a regression because we have lost some information. 


Is there any way to fix this? I.e. is there any way to recalculate the
values as part of info address? Could info address call
locexpr_read_variable or a variant of it? I always found info address
quite useful.


For the particular case at hand one could "cheat" and do like it was
done before, where, upon reading the value from the top of the stack
(which for the DW_GNU_push_tls_address case is the offset), such value
would be saved in the SYMBOL_VALUE field. If it was there, info
address would be able to access it. The offset is not changing over
time.

BTW, when this changes were checked in, a few things used by TLS
weren't cleaned up properly, like the global is_thread_local and the
enum value LOC_THREAD_LOCAL_STATIC, with the cases in printcmd.c and
findvar.c.


elena


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

end of thread, other threads:[~2003-07-22 15:39 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-18 14:54 What to do with info addr and location expressions Elena Zannoni
2003-07-18 15:30 ` Daniel Jacobowitz
2003-07-18 15:50   ` Andrew Cagney
2003-07-21 11:14     ` Nick Clifton
2003-07-21 17:54       ` Jim Blandy
2003-07-21 19:12         ` Andrew Cagney
2003-07-21 20:07         ` Nick Clifton
2003-07-21 20:14           ` Daniel Berlin
2003-07-21 20:35             ` Doug Evans
2003-07-21 20:33           ` Andrew Cagney
2003-07-21 20:45             ` DJ Delorie
2003-07-22  9:20               ` Nick Clifton
2003-07-22 13:26                 ` DJ Delorie
2003-07-22 15:33                   ` Nick Clifton
2003-07-22 15:39                     ` Daniel Jacobowitz
2003-07-18 16:01   ` Elena Zannoni
2003-07-18 16:11     ` Daniel Jacobowitz

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