* question, re: gdb.base/label.exp
@ 2011-02-23 22:43 Michael Snyder
2011-02-24 14:40 ` Tom Tromey
0 siblings, 1 reply; 10+ messages in thread
From: Michael Snyder @ 2011-02-23 22:43 UTC (permalink / raw)
To: gdb, tromey
Tom, does this test have a dependency on the compiler version?
It's failing on my RHEL5 system with cvs/head gdb.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: question, re: gdb.base/label.exp
2011-02-23 22:43 question, re: gdb.base/label.exp Michael Snyder
@ 2011-02-24 14:40 ` Tom Tromey
2011-02-24 18:21 ` Michael Snyder
0 siblings, 1 reply; 10+ messages in thread
From: Tom Tromey @ 2011-02-24 14:40 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb
>>>>> "Michael" == Michael Snyder <msnyder@vmware.com> writes:
Michael> Tom, does this test have a dependency on the compiler version?
Michael> It's failing on my RHEL5 system with cvs/head gdb.
It might, but I am not certain. I looked through the gdb-patches
archives but my original mail didn't say anything; nor did the PR.
You can check pretty easily with `readelf -wi' on the `labels'
executable that is made by the test suite. Search the output for the
`there' DIE. I get:
<2><b7>: Abbrev Number: 8 (DW_TAG_label)
<b8> DW_AT_name : (indirect string, offset: 0xc4): there
<bc> DW_AT_decl_file : 1
<bd> DW_AT_decl_line : 13
<be> DW_AT_low_pc : 0x804840c
I think the important parts are that (1) it exists and (2) it has a
DW_AT_low_pc.
Tom
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: question, re: gdb.base/label.exp
2011-02-24 14:40 ` Tom Tromey
@ 2011-02-24 18:21 ` Michael Snyder
2011-02-24 18:36 ` Tom Tromey
2011-02-24 19:26 ` Jan Kratochvil
0 siblings, 2 replies; 10+ messages in thread
From: Michael Snyder @ 2011-02-24 18:21 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb
Tom Tromey wrote:
>>>>>> "Michael" == Michael Snyder <msnyder@vmware.com> writes:
>
> Michael> Tom, does this test have a dependency on the compiler version?
> Michael> It's failing on my RHEL5 system with cvs/head gdb.
>
> It might, but I am not certain. I looked through the gdb-patches
> archives but my original mail didn't say anything; nor did the PR.
>
> You can check pretty easily with `readelf -wi' on the `labels'
> executable that is made by the test suite. Search the output for the
> `there' DIE. I get:
>
> <2><b7>: Abbrev Number: 8 (DW_TAG_label)
> <b8> DW_AT_name : (indirect string, offset: 0xc4): there
> <bc> DW_AT_decl_file : 1
> <bd> DW_AT_decl_line : 13
> <be> DW_AT_low_pc : 0x804840c
>
> I think the important parts are that (1) it exists and (2) it has a
> DW_AT_low_pc.
I see this:
<2><15d>: Abbrev Number: 8 (DW_TAG_label)
DW_AT_name : there
DW_AT_decl_file : 1
DW_AT_decl_line : 13
DW_AT_low_pc : 0x4004f1
<2><16e>: Abbrev Number: 8 (DW_TAG_label)
DW_AT_name : here
DW_AT_decl_file : 1
DW_AT_decl_line : 16
DW_AT_low_pc : 0x4004e0
I'm using gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: question, re: gdb.base/label.exp
2011-02-24 18:21 ` Michael Snyder
@ 2011-02-24 18:36 ` Tom Tromey
2011-02-24 19:26 ` Jan Kratochvil
1 sibling, 0 replies; 10+ messages in thread
From: Tom Tromey @ 2011-02-24 18:36 UTC (permalink / raw)
To: Michael Snyder; +Cc: gdb
Michael> I see this:
[...]
Looks ok to me.
Can you send the gdb.log file?
Maybe there is an answer in there.
Tom
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: question, re: gdb.base/label.exp
2011-02-24 18:21 ` Michael Snyder
2011-02-24 18:36 ` Tom Tromey
@ 2011-02-24 19:26 ` Jan Kratochvil
2011-02-24 20:09 ` Tom Tromey
1 sibling, 1 reply; 10+ messages in thread
From: Jan Kratochvil @ 2011-02-24 19:26 UTC (permalink / raw)
To: Michael Snyder; +Cc: Tom Tromey, gdb
On Thu, 24 Feb 2011 19:21:28 +0100, Michael Snyder wrote:
> <2><16e>: Abbrev Number: 8 (DW_TAG_label)
> DW_AT_name : here
> DW_AT_decl_file : 1
> DW_AT_decl_line : 16
************************** ^^ here should be 9
> DW_AT_low_pc : 0x4004e0
>
> I'm using gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
symbol_found() uses just SYMBOL_LINE.
The question is if we say this GCC is broken (and XFAIL it or move it to
gdb.dwarf2/) or whether GDB should use SYMBOL_VALUE_ADDRESS.
I am for the latter, DWARF talks for DW_TAG_label about DW_AT_low_pc and not
about DW_AT_decl_line.
Thanks,
Jan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: question, re: gdb.base/label.exp
2011-02-24 19:26 ` Jan Kratochvil
@ 2011-02-24 20:09 ` Tom Tromey
2011-02-25 9:19 ` Jan Kratochvil
0 siblings, 1 reply; 10+ messages in thread
From: Tom Tromey @ 2011-02-24 20:09 UTC (permalink / raw)
To: Jan Kratochvil; +Cc: Michael Snyder, gdb
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> The question is if we say this GCC is broken (and XFAIL it or move it to
Jan> gdb.dwarf2/) or whether GDB should use SYMBOL_VALUE_ADDRESS.
Jan> I am for the latter, DWARF talks for DW_TAG_label about
Jan> DW_AT_low_pc and not about DW_AT_decl_line.
Yes, I also think that makes sense.
Tom
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: question, re: gdb.base/label.exp
2011-02-24 20:09 ` Tom Tromey
@ 2011-02-25 9:19 ` Jan Kratochvil
2011-03-29 14:36 ` Edjunior Barbosa Machado
0 siblings, 1 reply; 10+ messages in thread
From: Jan Kratochvil @ 2011-02-25 9:19 UTC (permalink / raw)
To: Tom Tromey; +Cc: Michael Snyder, gdb
On Thu, 24 Feb 2011 21:09:39 +0100, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
>
> Jan> The question is if we say this GCC is broken (and XFAIL it or move it to
> Jan> gdb.dwarf2/) or whether GDB should use SYMBOL_VALUE_ADDRESS.
>
> Jan> I am for the latter, DWARF talks for DW_TAG_label about
> Jan> DW_AT_low_pc and not about DW_AT_decl_line.
>
> Yes, I also think that makes sense.
Just it will not work on reload of the executable changed underneath where PCs
change as EXPLICIT_PC needs to be in charge.
But it already does not work now for `run':
echo 'main(){l:;}'|gcc -g -x c -;../gdb -nx ./a.out
[...]
(gdb) start
[...]
(gdb) b l
[...]
(gdb) cont
Continuing.
Program exited with code 070.
(gdb) run
Starting program: .../a.out
Error in re-setting breakpoint 2: Function "l" not defined.
symtab_and_line->symtab is too general, there should be symtab_and_line->block.
Regards,
Jan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: question, re: gdb.base/label.exp
2011-02-25 9:19 ` Jan Kratochvil
@ 2011-03-29 14:36 ` Edjunior Barbosa Machado
2011-03-29 14:54 ` Tom Tromey
0 siblings, 1 reply; 10+ messages in thread
From: Edjunior Barbosa Machado @ 2011-03-29 14:36 UTC (permalink / raw)
To: gdb
On 02/25/2011 06:19 AM, Jan Kratochvil wrote:
> On Thu, 24 Feb 2011 21:09:39 +0100, Tom Tromey wrote:
>>>>>>> "Jan" == Jan Kratochvil<jan.kratochvil@redhat.com> writes:
>>
>> Jan> The question is if we say this GCC is broken (and XFAIL it or move it to
>> Jan> gdb.dwarf2/) or whether GDB should use SYMBOL_VALUE_ADDRESS.
>>
>> Jan> I am for the latter, DWARF talks for DW_TAG_label about
>> Jan> DW_AT_low_pc and not about DW_AT_decl_line.
>>
>> Yes, I also think that makes sense.
>
> Just it will not work on reload of the executable changed underneath where PCs
> change as EXPLICIT_PC needs to be in charge.
>
> But it already does not work now for `run':
>
just clarifying, this means it should be fixed on gcc anyway?
I also ran into the same problem on RHEL5 and, although the testcase passes ok on RHEL6, DW_AT_decl_line for label 'here' still seems incorrect (16, instead of 9).
Thanks,
--
Edjunior
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: question, re: gdb.base/label.exp
2011-03-29 14:36 ` Edjunior Barbosa Machado
@ 2011-03-29 14:54 ` Tom Tromey
2011-03-29 21:16 ` Jan Kratochvil
0 siblings, 1 reply; 10+ messages in thread
From: Tom Tromey @ 2011-03-29 14:54 UTC (permalink / raw)
To: Edjunior Barbosa Machado; +Cc: gdb
>>>>> "Edjunior" == Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com> writes:
Edjunior> just clarifying, this means it should be fixed on gcc anyway?
Edjunior> I also ran into the same problem on RHEL5 and, although the
Edjunior> testcase passes ok on RHEL6, DW_AT_decl_line for label 'here'
Edjunior> still seems incorrect (16, instead of 9).
I changed this code in GDB this past week. Now GDB looks at the label's
DW_AT_low_pc, not DW_AT_decl_line.
I don't know whether there are bugs with this in older versions of GCC.
Tom
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: question, re: gdb.base/label.exp
2011-03-29 14:54 ` Tom Tromey
@ 2011-03-29 21:16 ` Jan Kratochvil
0 siblings, 0 replies; 10+ messages in thread
From: Jan Kratochvil @ 2011-03-29 21:16 UTC (permalink / raw)
To: Tom Tromey; +Cc: Edjunior Barbosa Machado, gdb
On Tue, 29 Mar 2011 16:54:29 +0200, Tom Tromey wrote:
> I changed this code in GDB this past week. Now GDB looks at the label's
> DW_AT_low_pc, not DW_AT_decl_line.
>
> I don't know whether there are bugs with this in older versions of GCC.
At least on RHEL-5 gcc-4.1.2-50.el5.x86_64 the testcase has now turned
FAIL->PASS.
Thanks,
Jan
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-03-29 21:16 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-23 22:43 question, re: gdb.base/label.exp Michael Snyder
2011-02-24 14:40 ` Tom Tromey
2011-02-24 18:21 ` Michael Snyder
2011-02-24 18:36 ` Tom Tromey
2011-02-24 19:26 ` Jan Kratochvil
2011-02-24 20:09 ` Tom Tromey
2011-02-25 9:19 ` Jan Kratochvil
2011-03-29 14:36 ` Edjunior Barbosa Machado
2011-03-29 14:54 ` Tom Tromey
2011-03-29 21:16 ` Jan Kratochvil
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).