* FYI: fix small regression with gcc trunk
@ 2010-07-26 20:24 Tom Tromey
2010-07-26 20:38 ` Jan Kratochvil
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2010-07-26 20:24 UTC (permalink / raw)
To: gdb-patches
I'm checking this in.
I recently ran the gdb test suite against GCC svn trunk. This revealed
a number of regressions, mostly little test case bugs.
This patch fixes one regression that appears in gdb itself. GCC changed
how it emits TLS references, to fix a bug. This caused "info address"
output to change, causing a gdb test suite regression.
Built and regtested on x86-64 (compile farm).
I also tested the appropriate test case locally with both the new and
old GCC.
Tom
2010-07-26 Tom Tromey <tromey@redhat.com>
* dwarf2loc.c (locexpr_describe_location_piece): Also recognize
TLS with DW_OP_const4u or DW_OP_const8u.
Index: dwarf2loc.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2loc.c,v
retrieving revision 1.95
diff -u -r1.95 dwarf2loc.c
--- dwarf2loc.c 13 Jul 2010 15:09:03 -0000 1.95
+++ dwarf2loc.c 26 Jul 2010 20:22:24 -0000
@@ -2016,15 +2016,19 @@
DW_AT_location : 10 byte block: 3 4 0 0 0 0 0 0 0 e0
(DW_OP_addr: 4; DW_OP_GNU_push_tls_address)
-
+
0x3 is the encoding for DW_OP_addr, which has an operand as long
as the size of an address on the target machine (here is 8
- bytes). 0xe0 is the encoding for DW_OP_GNU_push_tls_address.
- The operand represents the offset at which the variable is within
- the thread local storage. */
+ bytes). Note that more recent version of GCC emit DW_OP_const4u
+ or DW_OP_const8u, depending on address size, rather than
+ DW_OP_addr. 0xe0 is the encoding for
+ DW_OP_GNU_push_tls_address. The operand represents the offset at
+ which the variable is within the thread local storage. */
else if (data + 1 + addr_size < end
- && data[0] == DW_OP_addr
+ && (data[0] == DW_OP_addr
+ || (addr_size == 4 && data[0] == DW_OP_const4u)
+ || (addr_size == 8 && data[0] == DW_OP_const8u))
&& data[1 + addr_size] == DW_OP_GNU_push_tls_address
&& piece_end_p (data + 2 + addr_size, end))
{
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FYI: fix small regression with gcc trunk
2010-07-26 20:24 FYI: fix small regression with gcc trunk Tom Tromey
@ 2010-07-26 20:38 ` Jan Kratochvil
2010-07-26 23:47 ` Joel Brobecker
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kratochvil @ 2010-07-26 20:38 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches, Joel Brobecker
On Mon, 26 Jul 2010 22:24:45 +0200, Tom Tromey wrote:
> I'm checking this in.
Thanks, would it be for 7.2?
Regards,
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FYI: fix small regression with gcc trunk
2010-07-26 20:38 ` Jan Kratochvil
@ 2010-07-26 23:47 ` Joel Brobecker
2010-07-27 16:09 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Joel Brobecker @ 2010-07-26 23:47 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: Tom Tromey, gdb-patches
> > I'm checking this in.
>
> Thanks, would it be for 7.2?
This patch seems very reasonable for 7.2.
--
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: FYI: fix small regression with gcc trunk
2010-07-26 23:47 ` Joel Brobecker
@ 2010-07-27 16:09 ` Tom Tromey
0 siblings, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2010-07-27 16:09 UTC (permalink / raw)
To: Joel Brobecker; +Cc: Jan Kratochvil, gdb-patches
Jan> Thanks, would it be for 7.2?
Joel> This patch seems very reasonable for 7.2.
I will commit it to the branch soon.
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-07-27 16:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-26 20:24 FYI: fix small regression with gcc trunk Tom Tromey
2010-07-26 20:38 ` Jan Kratochvil
2010-07-26 23:47 ` Joel Brobecker
2010-07-27 16:09 ` 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).