public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Thiago Jung Bauermann <thiago.bauermann@linaro.org>,
	Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/4] gdb/dwarf2: move some things to read.h
Date: Tue, 14 Feb 2023 14:35:03 -0500	[thread overview]
Message-ID: <5757c2f7-07ae-1d14-5af2-e6b67cbf0c89@polymtl.ca> (raw)
In-Reply-To: <87sff90yss.fsf@linaro.org>

On 2/13/23 21:24, Thiago Jung Bauermann wrote:
> 
> Tom Tromey <tom@tromey.com> writes:
> 
>>>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>>
>> Simon> The following 2 patches move .gdb_index and .debug_names reading code to
>> Simon> their own file.  Prepare this by exposing some things used by that code
>> Simon> to read.h.
>>
>> Simon> +/* If FILE_MATCHER is NULL or if PER_CU has
>> Simon> +   dwarf2_per_cu_quick_data::MARK set (see
>> Simon> +   dw_expand_symtabs_matching_file_matcher), expand the CU and call
>> Simon> +   EXPANSION_NOTIFY on it.  */
>> Simon> +
>> Simon> +bool
>> Simon> +dw2_expand_symtabs_matching_one
>> Simon> +  (dwarf2_per_cu_data *per_cu,
>> Simon> +   dwarf2_per_objfile *per_objfile,
>> Simon> +   gdb::function_view<expand_symtabs_file_matcher_ftype> file_matcher,
>> Simon> +   gdb::function_view<expand_symtabs_exp_notify_ftype> expansion_notify);
>>
>> Don't we normally write "extern" in headers?
> 
> IIUC “extern” is only meaningful for variable and template declarations.

For some reason, our coding standards says we should use extern for
function declarations:

https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#Function_Prototypes

But I don't understand why, IMO it just consumes some columns for no
purpose.  Also, it's not always respected, there are many header files
that don't use it.

Simon

  reply	other threads:[~2023-02-14 19:35 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-13 14:55 [PATCH 0/4] Move index reading code out of dwarf2/read.c Simon Marchi
2023-02-13 14:55 ` [PATCH 1/4] gdb/dwarf2: rename some things, index -> gdb_index Simon Marchi
2023-02-13 23:30   ` Tom Tromey
2023-02-14 19:55     ` Simon Marchi
2023-02-13 14:55 ` [PATCH 2/4] gdb/dwarf2: move some things to read.h Simon Marchi
2023-02-13 23:33   ` Tom Tromey
2023-02-14  2:24     ` Thiago Jung Bauermann
2023-02-14 19:35       ` Simon Marchi [this message]
2023-02-14 19:37     ` Simon Marchi
2023-02-13 14:55 ` [PATCH 3/4] gdb/dwarf2: split .gdb_index reading code to own file Simon Marchi
2023-02-13 23:35   ` Tom Tromey
2023-02-13 14:55 ` [PATCH 4/4] gdb/dwarf2: split .debug_names " Simon Marchi
2023-02-13 23:38   ` Tom Tromey

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=5757c2f7-07ae-1d14-5af2-e6b67cbf0c89@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=thiago.bauermann@linaro.org \
    --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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).