From: Tom de Vries <tdevries@suse.de>
To: Luis Machado <luis.machado@arm.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp for aarch64
Date: Wed, 14 Sep 2022 10:36:28 +0200 [thread overview]
Message-ID: <22a9dc8f-d735-4d0a-4523-00ab7555b6ed@suse.de> (raw)
In-Reply-To: <39e382f2-b0e4-46b0-6745-83f0bfcc1c3d@arm.com>
On 9/13/22 18:00, Luis Machado wrote:
> On 9/13/22 15:48, Tom de Vries wrote:
>> Hi,
>>
>> [ Another attempt at fixing the problem described in commit cd919f5533c
>> ("[gdb/testsuite] Fix gdb.dwarf2/dw2-dir-file-name.exp"). ]
>
> Tricky one. :-)
>
It is indeed.
I just did a run with cc-with-debug-names target board, and ran into
FAILs in the same test-case. I haven't done root cause analysis yet,
but my suspicion is that I'll need to add a .debug_aranges entries.
>>
>> When running the test-case gdb.dwarf2/dw2-dir-file-name.exp with
>> aarch64-linux, we run into:
>> ...
>> (gdb) continue^M
>> Continuing.^M
>> ^M
>> Breakpoint 2, compdir_missing__ldir_missing__file_basename () at \
>> tmp-dw2-dir-file-name.c:999^M
>> (gdb) FAIL: gdb.dwarf2/dw2-dir-file-name.exp: \
>> compdir_missing__ldir_missing__file_basename: continue to
>> breakpoint: \
>> compdir_missing__ldir_missing__file_basename
>> ...
>>
>> The breakpoint set at compdir_missing__ldir_missing__file_basename_label,
>> address 0x400608 starts at a line entry:
>> ...
>> CU: tmp-dw2-dir-file-name.c:
>> File name Line number Starting address
>> View Stmt
>> tmp-dw2-dir-file-name.c 999
>> 0x400608 x
>> tmp-dw2-dir-file-name.c 1000
>> 0x40062c x
>> tmp-dw2-dir-file-name.c - 0x40062c
>> ...
>> and therefore the breakpoint is printed without instruction address.
>>
>> In contrast, for x86_64-linux, we have the breakpoint printed with
>> instruction
>> address:
>> ...
>> (gdb) continue^M
>> Continuing.^M
>> ^M
>> Breakpoint 2, 0x004004c1 in
>> compdir_missing__ldir_missing__file_basename () \
>> at tmp-dw2-dir-file-name.c:999^M
>> (gdb) PASS: gdb.dwarf2/dw2-dir-file-name.exp: \
>> compdir_missing__ldir_missing__file_basename: continue to
>> breakpoint: \
>> compdir_missing__ldir_missing__file_basename
>> ...
>>
>> The breakpoint set at compdir_missing__ldir_missing__file_basename_label,
>> address 0x004004c1 doesn't start at a line entry:
>> ...
>> CU: tmp-dw2-dir-file-name.c:
>> File name Line number Starting address
>> View Stmt
>> tmp-dw2-dir-file-name.c 999
>> 0x4004bd x
>> tmp-dw2-dir-file-name.c 1000
>> 0x4004d3 x
>> tmp-dw2-dir-file-name.c - 0x4004d3
>> ...
>>
>> Fix this by:
>> - unifying behaviour between the archs by adding an explicit line
>> number entry
>> for the address compdir_missing__ldir_missing__file_basename_label,
>> making
>> the FAIL reproducible on x86_64-linux.
>> - expecting the breakpoint to be printed without instruction address.
>>
>> Tested on x86_64-linux and aarch64-linux.
>>
>> Any comments?
>
> Thanks for the quick patch.
>
> From my end it looks good, and makes the tests pass again.
>
Ack, I'll commit today.
Thanks,
- Tom
prev parent reply other threads:[~2022-09-14 8:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-13 14:48 Tom de Vries
2022-09-13 16:00 ` Luis Machado
2022-09-14 8:36 ` Tom de Vries [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22a9dc8f-d735-4d0a-4523-00ab7555b6ed@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=luis.machado@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).