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>
Subject: RE: [PATCH v2] Add support for recording minimal symbols in AIX for non DWARF compiled library function record.
Date: Mon, 23 Mar 2026 04:40:34 +0000 [thread overview]
Message-ID: <LV8PR15MB6488DB91D898B67249F68BD1D64BA@LV8PR15MB6488.namprd15.prod.outlook.com> (raw)
In-Reply-To: <877br69zuc.fsf@tromey.com>
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
Hi Tom,
Thank you for your feedback. I have sent a v3 of this patch with the suggestions.
>> + bfd *abfd = objfile->obfd.get ();
>> + long do_we_need_storage = bfd_get_symtab_upper_bound (abfd);
>> +
>> + if (do_we_need_storage <= 0)
>> + return;
>> +
>> + gdb::unique_xmalloc_ptr<asymbol *> sym_table
>> + ((asymbol **) xmalloc (do_we_need_storage));
>> + /* Get the number of symbols we need. */
>> + int number_of_symbols = bfd_canonicalize_symtab (abfd, sym_table.get());
>> +
>> + /* Return on error. */
>> + if (number_of_symbols < 0)
>> + return;
>This code should be replaced with a call to >gdb_bfd_canonicalize_symtab.
>That was added to avoid some pathological behavior, see the >?>comment in
>gdb_bfd.h and/or the associated bug.
>Since you don't want an error here you should pass 'false’ for
>should_throw.
>I forgot about the existence of this earlier and only remembered it >when
>I was looking at something else…
Yeah, it is a nice idea and glad you suggested it.
Thanks once again.
Have a nice day ahead.
Regards,
Aditya.
[-- Attachment #2: Type: text/html, Size: 2865 bytes --]
prev parent reply other threads:[~2026-03-23 4:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 12:16 Aditya Vidyadhar Kamath
2026-03-20 17:26 ` Tom Tromey
2026-03-23 4:40 ` 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=LV8PR15MB6488DB91D898B67249F68BD1D64BA@LV8PR15MB6488.namprd15.prod.outlook.com \
--to=aditya.kamath1@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