Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Aditya Kamath <Aditya.Kamath1@ibm.com>
To: Tom Tromey <tom@tromey.com>,
	Aditya Vidyadhar Kamath <akamath996@gmail.com>
Cc: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	"simon.marchi@polymtl.ca" <simon.marchi@polymtl.ca>,
	"tom@tromey.com" <tom@tromey.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	SANGAMESH MALLAYYA <sangamesh.swamy@in.ibm.com>,
	PRAJWAL B MEHENDARKAR <PRAJWAL.B.MEHENDARKAR@ibm.com>
Subject: RE: [PATCH v2][RFC] Fix crash in AIX when current working directory is NULL
Date: Wed, 22 Jul 2026 11:45:36 +0000	[thread overview]
Message-ID: <LV8PR15MB6488E3F5F81E181889342039D6C12@LV8PR15MB6488.namprd15.prod.outlook.com> (raw)
In-Reply-To: <878q74utan.fsf@tromey.com>

[-- Attachment #1: Type: text/plain, Size: 2017 bytes --]

Hi Tom and community members,

Thank you for your feedback Tom. I have made corrections as per your inputs and sent a v3 patch.

>>    desc = openp (search_path, flags, file_name, O_RDONLY | O_BINARY,
>> -             &absolute_name, per_bfd->captured_cwd.c_str ());
>> +             &absolute_name, per_bfd->captured_cwd.has_value () ?
>> +             per_bfd->captured_cwd->c_str () : nullptr);

>gdb style is to put operators at the start of a new line.
>For "?:" in particular I would also move the condition to a new line.

Done in v3.

>> diff --git a/gdb/testsuite/gdb.base/getcwd-fail-helper.c b/gdb/testsuite/gdb.base/getcwd-fail-helper.c
>> new file mode 100644
>> index 00000000000..a5e8fe80cbf
>> --- /dev/null
>> +++ b/gdb/testsuite/gdb.base/getcwd-fail-helper.c
>> @@ -0,0 +1,67 @@
>> +/* Helper to reproduce getcwd failure by deleting cwd via child process.  */
>> +#include <stdio.h>

>New files should have a copyright header.

>This applies to the other files as well.

Done in v3.

Referred,
bash-5.3# head -25 gdb.tui/tailcall-msym.exp
# Copyright 2026 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.


>> +catch {file delete -force $temp_dir}

>Deleting this is probably undesirable.  It's normally good if running a
>test leaves the test environment around.

Sure, done in v3 of the patch.

Thanks and regards,
Aditya.

[-- Attachment #2: Type: text/html, Size: 5895 bytes --]

      reply	other threads:[~2026-07-22 11:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16 11:20 Aditya Vidyadhar Kamath
2026-07-21 17:49 ` Tom Tromey
2026-07-22 11:45   ` Aditya Kamath [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=LV8PR15MB6488E3F5F81E181889342039D6C12@LV8PR15MB6488.namprd15.prod.outlook.com \
    --to=aditya.kamath1@ibm.com \
    --cc=PRAJWAL.B.MEHENDARKAR@ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=akamath996@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=sangamesh.swamy@in.ibm.com \
    --cc=simon.marchi@polymtl.ca \
    --cc=tom@tromey.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