From: "Potharla, Rupesh" <Rupesh.Potharla@amd.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: "George, Jini Susan" <JiniSusan.George@amd.com>,
"Parasuraman, Hariharan" <Hariharan.Parasuraman@amd.com>,
"Natarajan, Kavitha" <Kavitha.Natarajan@amd.com>,
"Potharla, Rupesh via Binutils" <binutils@sourceware.org>
Subject: RE: [PATCH] bfd: Fix issues with files in debug_line table with dwarf5.
Date: Tue, 31 May 2022 18:07:45 +0000 [thread overview]
Message-ID: <DM6PR12MB4219EB0121F89F5DE74CB404E7DC9@DM6PR12MB4219.namprd12.prod.outlook.com> (raw)
In-Reply-To: <d55dc733-a855-948e-3cc6-e203733506ca@suse.com>
[AMD Official Use Only - General]
>-----Original Message-----
>From: Jan Beulich <jbeulich@suse.com>
>Sent: Wednesday, May 25, 2022 11:49 AM
>To: Potharla, Rupesh <Rupesh.Potharla@amd.com>
>Cc: George, Jini Susan <JiniSusan.George@amd.com>; Parasuraman,
>Hariharan <Hariharan.Parasuraman@amd.com>; Natarajan, Kavitha
><Kavitha.Natarajan@amd.com>; Potharla, Rupesh via Binutils
><binutils@sourceware.org>
>Subject: Re: [PATCH] bfd: Fix issues with files in debug_line table with dwarf5.
>
>[CAUTION: External Email]
>
>On 25.05.2022 06:20, Potharla, Rupesh wrote:
>>>> - /* Skip the first "zero entry", which is the compilation dir/file. */
>>>> - if (datai != 0)
>>>> - if (!callback (table, fe.name, fe.dir, fe.time, fe.size))
>>>> - return false;
>>>> + if (!callback (table, fe.name, fe.dir, fe.time, fe.size))
>>>> + return false;
>>>> }
>>>
>>> How come this change doesn't add a version check?
>>>
>> Since the function read_formatted_entries is only called for version 5 in the
>file, I thought the version check is not needed. Now I have added the
>condition and updated the patch.
>
>Oh, I'm sorry - I hadn't noticed this aspect. I don't think a version check is
>needed then.
>
>>> To help being certain this is the right way of changing things, can
>>> you please add up to two testcases (readelf and/or objdump), one for
>>> a version < 5 (unless one such already exists and hence it would be
>>> visible there that you don't unduly alter handling of those older versions)
>and one for version 5?
>>>
>>
>> Readelf and objdump are not using dwarf2.c file under bfd directory these
>tools are using dwarf.c under binutils directory.
>
>Argh, yes - too many dwarf*.c in the tree.
>
>> Currently I am using addr2line to test and validate my code changes
>manually. There are no testcases for addr2line and I did not find any testcases
>for bfd library as well. Please let me know your suggestions .
>
>Is there a reason speaking against adding an addr2line test? The generic
>framework looks to know of addr2line. (Perhaps ideally the same source
>would be used for both an addr2line test and a readelf or objdump one, as to
>prove that the two forms of Dwarf reading are actually in sync. But I guess
>that's asking for too much.)
>
Regarding test for addr2line, the input address given to addr2line is retrieved from output of nm/objdump tool. The functioning of the addr2line tool depends on the reliability of other tools.
>Jan
next prev parent reply other threads:[~2022-05-31 18:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 7:03 Potharla, Rupesh
2022-05-18 12:36 ` Jan Beulich
2022-05-25 4:20 ` Potharla, Rupesh
2022-05-25 6:18 ` Jan Beulich
2022-05-31 18:07 ` Potharla, Rupesh [this message]
2022-07-05 5:05 ` Potharla, Rupesh
2022-07-05 6:06 ` Jan Beulich
2022-07-05 6:46 Potharla, Rupesh
2022-07-20 5:03 ` Potharla, Rupesh
2022-07-20 7:59 ` Jan Beulich
2022-07-25 14:30 ` Jan Beulich
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=DM6PR12MB4219EB0121F89F5DE74CB404E7DC9@DM6PR12MB4219.namprd12.prod.outlook.com \
--to=rupesh.potharla@amd.com \
--cc=Hariharan.Parasuraman@amd.com \
--cc=JiniSusan.George@amd.com \
--cc=Kavitha.Natarajan@amd.com \
--cc=binutils@sourceware.org \
--cc=jbeulich@suse.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).