Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: gdb-patches@sourceware.org
Cc: Eli Zaretskii <eliz@gnu.org>, Mark Wielaard <mark@klomp.org>,
	       Doug Evans <dje@google.com>
Subject: Re: [RFA take 5] Allow setting breakpoints on inline functions (PR	10738)
Date: Mon, 20 Feb 2012 20:26:00 -0000	[thread overview]
Message-ID: <20120220194804.GA5968@host2.jankratochvil.net> (raw)
In-Reply-To: <20120220155848.GA5813@redhat.com>

On Mon, 20 Feb 2012 16:58:49 +0100, Gary Benson wrote:
> This version of the patch has been updated to add a new command line
> option, --allow-incomplete-gdb-indexes,

Sorry I was a bit offline, I believe such option would be OK just as a vendor
patch.  Still I understand patching back the backward support is not easy so
OK, one day it can get finally dropped.


> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
[...]
> @@ -2121,13 +2125,20 @@ dwarf2_read_index (struct objfile *objfile)
>    /* Versions earlier than 3 emitted every copy of a psymbol.  This
>       causes the index to behave very poorly for certain requests.  Version 3
>       contained incomplete addrmap.  So, it seems better to just ignore such
> -     indices.  Index version 4 uses a different hash function than index
> -     version 5 and later.  */
> -  if (version < 4)
> +     indices.
> +
> +     Index version 4 uses a different hash function than index version
> +     5 and later.
> +
> +     Versions earlier than 5 did not emit psymbols for inlined

than 6

> +     functions.  Using these files will cause GDB not to be able to
> +     set breakpoints on inlined functions by name, so we ignore these
> +     indices unless --allow-incomplete-gdb-indexes was supplied.  */
> +  if (version < (allow_incomplete_gdb_indexes ? 4 : 6))
>      return 0;
>    /* Indexes with higher version than the one supported by GDB may be no
>       longer backward compatible.  */
> -  if (version > 5)
> +  if (version > 6)
>      return 0;
>  
>    map = OBSTACK_ZALLOC (&objfile->objfile_obstack, struct mapped_index);
[...]
> --- a/gdb/main.c
> +++ b/gdb/main.c
> @@ -87,6 +87,11 @@ int return_child_result_value = -1;
>  /* Whether to enable writing into executable and core files.  */
>  extern int write_files;
>  
> +/* Whether to use incomplete .gdb-index sections.
> +   The default is to reject them.  */
> +
> +extern int allow_incomplete_gdb_indexes;
> +

Please no "extern var" in *.c files, it may lead to non-matching types etc.
I understand it is present in the current codebase but this is not an excuse,
fixed it now:
	[obv] Code cleanup: main.c declarations
	http://sourceware.org/ml/gdb-patches/2012-02/msg00410.html

Put it to symfile.h where are declarations for other dwarf2read.c definitions.


> @@ -975,6 +982,10 @@ This is the GNU debugger.  Usage:\n\n\
>  Options:\n\n\
>  "), stream);
>    fputs_unfiltered (_("\
> +  --allow-incomplete-gdb-indexes\n\
> +                     Do not reject incomplete .gdb-index sections.\n\

I do not understand the option meaning in such terse form.  As English
non-native I would prefer just "old" everywhere (or Doug says "deprecated").

                        Do not reject old (incomplete) .gdb-index sections.\n\

OK for check-in with these and Eli's changes.


Thanks,
Jan


  parent reply	other threads:[~2012-02-20 19:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-20 16:16 Gary Benson
2012-02-20 19:24 ` Eli Zaretskii
2012-02-20 20:26 ` Jan Kratochvil [this message]
2012-02-22 14:58   ` Jan Kratochvil
2012-02-22 17:20     ` Doug Evans
2012-02-23 11:15       ` Jan Kratochvil
2012-02-23 11:18         ` Gary Benson
     [not found] ` <CADPb22Qi8=Z_Q7j60dPP010eXdjPq2yiftT0x43dF=zmL8H64Q@mail.gmail.com>
2012-02-20 20:42   ` Eli Zaretskii

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=20120220194804.GA5968@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=dje@google.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=mark@klomp.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