Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fabian Kilger <kilger@sec.in.tum.de>
To: Andrew Burgess <aburgess@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2][PR GDB/32956] gdb: query inferior's filesystem for build-id debug files
Date: Wed, 11 Jun 2025 10:11:38 +0200	[thread overview]
Message-ID: <85608652-8d05-436b-b099-9ea72247079d@sec.in.tum.de> (raw)
In-Reply-To: <87ecvshshw.fsf@redhat.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 4948 bytes --]

No problem, thanks for getting back to me. As a first-time contributor
I'm a bit confused about the rules regarding merging and pushing.
According to gdb/MAINTAINERS, I should not have write access and need to
be first added, correct? And according to
  https://sourceware.org/gdb/wiki/ContributionChecklist
a moderator or maintainer needs to send me a form regarding FSF
copyright assignment first.

I would appreciate some clarifications/instructions on what to do next.

I've also prepared a PATCH v2 for the remaining changes, but wasn't sure
about some style points I asked about in:


https://inbox.sourceware.org/gdb-patches/06881879-1236-4ad7-b983-c195c1c0a84a@sec.in.tum.de/

Thanks,
Fabian


On 6/10/25 11:10, Andrew Burgess wrote:
> Fabian Kilger <kilger@sec.in.tum.de> writes:
> 
>> Thanks for approving, I'll add the link to the commit message.
>>
>> If I merge this ahead of #1, can I leave it out in the v2 patch
>> submission, or should it be included for completeness' sake - not sure
>> what is desired.
> 
> Sorry, have been side tracked on other tasks.
> 
> I think you should merge this, and any new iteration would not include
> this patch as this would now be part of GDB.
> 
> Thanks,
> Andrew
> 
> 
> 
>>
>> Best,
>> Fabian
>>
>> On 5/23/25 20:20, Andrew Burgess wrote:
>>> Fabian Kilger <kilger@sec.in.tum.de> writes:
>>>
>>>> This fixes a bug related to build-id files with linux namespaces.
>>>> Specifically, we expect the debug files to be present inside the container,
>>>> thus the container filesystem should be queried if the program is running
>>>> inside one.
>>>
>>> You should add a bug link to the end of this commit message, like:
>>>
>>> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32956
>>>
>>> With that added, for this patch:
>>>
>>> Approved-By: Andrew Burgess <aburgess@redhat.com>
>>>
>>> You are welcome to merge this ahead of patch #1 if you want, as they are
>>> related, but don't depend on each other.
>>>
>>> Thanks,
>>> Andrew
>>>
>>>
>>>
>>>>
>>>> ---
>>>>  gdb/build-id.c | 6 ++++--
>>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/gdb/build-id.c b/gdb/build-id.c
>>>> index 43a80dd3978..abbd65a7c12 100644
>>>> --- a/gdb/build-id.c
>>>> +++ b/gdb/build-id.c
>>>> @@ -29,6 +29,7 @@
>>>>  #include "gdbsupport/scoped_fd.h"
>>>>  #include "debuginfod-support.h"
>>>>  #include "extension.h"
>>>> +#include "inferior.h"
>>>>  
>>>>  /* See build-id.h.  */
>>>>  
>>>> @@ -128,7 +129,8 @@ build_id_to_debug_bfd_1 (const std::string &original_link,
>>>>  	  if (supports_target_stat != TRIBOOL_FALSE)
>>>>  	    {
>>>>  	      struct stat sb;
>>>> -	      int res = target_fileio_stat (nullptr, link_on_target, &sb,
>>>> +	      int res = target_fileio_stat (current_inferior (),
>>>> +					    link_on_target, &sb,
>>>>  					    &target_errno);
>>>>  
>>>>  	      if (res != 0 && target_errno != FILEIO_ENOSYS)
>>>> @@ -157,7 +159,7 @@ build_id_to_debug_bfd_1 (const std::string &original_link,
>>>>  		 the path doesn't exist, but we just assume that anything
>>>>  		 other than EINVAL indicates the path doesn't exist.  */
>>>>  	      std::optional<std::string> link_target
>>>> -		= target_fileio_readlink (nullptr, link_on_target,
>>>> +		= target_fileio_readlink (current_inferior (), link_on_target,
>>>>  					  &target_errno);
>>>>  	      if (link_target.has_value ()
>>>>  		  || target_errno == FILEIO_EINVAL)
>>>> -- 
>>>> 2.49.0
>>>
>>
>> -- 
>> Fabian Kilger, M.Sc.
>> Wissenschaftlicher Mitarbeiter
>>
>> Technische Universität München
>> TUM School of Computation, Information and Technology
>> Chair of IT Security
>>
>> Boltzmannstraße 3
>> 85748 Garching (bei München)
>>
>> Tel. +49 (0)89 289-18587
>> Fax +49 (0)89 289-18579
>>
>> kilger@sec.in.tum.de
>> www.sec.in.tum.de
>> -----BEGIN PGP PUBLIC KEY BLOCK-----
>>
>> xjMEYHltfxYJKwYBBAHaRw8BAQdA7mzpLUfZIcIiMjdx+GBa8RuqZdMp/MUEpu4P
>> DTb2YwXNJEZhYmlhbiBLaWxnZXIgPGtpbGdlckBzZWMuaW4udHVtLmRlPsKLBBMW
>> CAAzFiEETPRi+vRLaNymGJvYr2lqRpshfmkFAmB5bX8CGwMFCwkIBwIGFQgJCgsC
>> BRYCAwEAAAoJEK9pakabIX5pCzcA/ivCFRRbxJfpiwOzV5CvflcHPNN2LmCxSBlc
>> rBpliBhWAP43PcAtWheftijoLpcwy3nD0TVTDRrJY/hRkKDbvmrWCM44BGB5bX8S
>> CisGAQQBl1UBBQEBB0BtYlZed2qkwQWmV+MaUhC78XgZI0ezLuU2nr8bocqXCAMB
>> CAfCeAQYFggAIBYhBEz0Yvr0S2jcphib2K9pakabIX5pBQJgeW1/AhsMAAoJEK9p
>> akabIX5pUNQA/juajzwCYdtbo+sXQUlZufPiPwLiPr6LuJBNZwL6OlbmAQDvyu6h
>> +X9K2gzgLviiNEmcCAddwynvjXiLt3c+oir7AA==
>> =VdeZ
>> -----END PGP PUBLIC KEY BLOCK-----
> 

-- 
Fabian Kilger, M.Sc.
Wissenschaftlicher Mitarbeiter

Technische Universität München
TUM School of Computation, Information and Technology
Chair of IT Security

Boltzmannstraße 3
Raum 01.08.053
85748 Garching (bei München)

Tel. +49 (0)89 289-18587
Fax +49 (0)89 289-18579

kilger@sec.in.tum.de
www.sec.in.tum.de

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 653 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  reply	other threads:[~2025-06-11  8:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-11 15:01 [PATCH 0/2][PR GDB/32956] gdb: fix GDB failing to find build-id debug files in linux mount namespaces Fabian Kilger
2025-05-11 15:01 ` [PATCH 1/2][PR GDB/32956] gdb: implement linux namespace support for fileio_stat Fabian Kilger
2025-05-23 18:14   ` Andrew Burgess
2025-05-24 20:25     ` Fabian Kilger
2025-06-11  9:43       ` Andrew Burgess
2025-05-24 10:46   ` Andrew Burgess
2025-05-24 19:43     ` Fabian Kilger
2025-05-24 20:43       ` Fabian Kilger
2025-06-11  9:47         ` Andrew Burgess
2025-06-11  9:58           ` Andrew Burgess
2025-06-11 13:29             ` Tom Tromey
2025-06-11 14:47               ` Andrew Burgess
2025-06-11 17:45                 ` Tom Tromey
2025-06-11 15:06             ` Fabian Kilger
2025-05-11 15:01 ` [PATCH 2/2][PR GDB/32956] gdb: query inferior's filesystem for build-id debug files Fabian Kilger
2025-05-23 18:20   ` Andrew Burgess
2025-05-24 19:54     ` Fabian Kilger
2025-06-10  9:10       ` Andrew Burgess
2025-06-11  8:11         ` Fabian Kilger [this message]
2025-06-11  9:35           ` Andrew Burgess
2025-06-11 14:00             ` Simon Marchi
2025-05-30 19:50 ` [PATCH 0/2][PR GDB/32956] gdb: fix GDB failing to find build-id debug files in linux mount namespaces Tom Tromey
2025-06-10 17:02   ` Andrew Burgess

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=85608652-8d05-436b-b099-9ea72247079d@sec.in.tum.de \
    --to=kilger@sec.in.tum.de \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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