This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [commit] Add ARI marker to get_DW_AT_signature_type.
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Joel Brobecker'" <brobecker at adacore dot com>, <gdb-patches at sourceware dot org>
- Date: Mon, 29 Apr 2013 10:38:01 +0200
- Subject: RE: [commit] Add ARI marker to get_DW_AT_signature_type.
- References: <20130418151631 dot GI3525 at adacore dot com> <1367212141-16536-1-git-send-email-brobecker at adacore dot com>
Hi all,
Joel,
I commpletely agree with you on the principle of this patch,
but I must confess that it somehow also bypasses the current
implementation of the editCase rule:
The problem is the following:
if you lok at the patterns for "UCASE function" or "editCase function"
rules,
you will see that possible_editCase is set to one
if and only if there is a function name starting at start of line
followed by an opening brace on the same line...
Which is not the case anymore after your patch...
The rule is built to be able to find /* ARI: editCase function */
in any of the lines listing all the parameters....
At least, it is now that I just fixed a spelling error
inside gdb_ari.sh that prevented it from working correctly before...
So I would like to propose this patch:
Pierre Muller as ARI maintainer.
2013-04-29 Pierre Muller <muller@sourceware.org>
* dwarf2read.c (handle_DW_AT_stmt_list): Avoid ARI warning for
editCase function rule.
(get_DW_AT_signature_type): Likewise.
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.790
diff -u -p -r1.790 dwarf2read.c
--- dwarf2read.c 29 Apr 2013 05:05:44 -0000 1.790
+++ dwarf2read.c 29 Apr 2013 08:34:26 -0000
@@ -8053,7 +8053,7 @@ find_file_and_directory (struct die_info
static void
handle_DW_AT_stmt_list (struct die_info *die, struct dwarf2_cu *cu,
- const char *comp_dir)
+ const char *comp_dir) /ARI: editCase function */
{
struct attribute *attr;
@@ -17924,8 +17924,8 @@ get_signatured_type (struct die_info *di
reading in and processing the type unit if necessary. */
static struct type *
-get_DW_AT_signature_type /* ARI: editCase */
- (struct die_info *die, struct attribute *attr, struct dwarf2_cu *cu)
+get_DW_AT_signature_type (struct die_info *die, struct attribute *attr,
+ struct dwarf2_cu *cu) /* ARI: editCase function */
{
/* Yes, DW_AT_signature can use a non-ref_sig8 reference. */
if (is_ref_attr (attr))
> -----Message d'origine-----
> De : gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé : lundi 29 avril 2013 07:09
> À : gdb-patches@sourceware.org
> Cc : Joel Brobecker
> Objet : [commit] Add ARI marker to get_DW_AT_signature_type.
>
> Hello,
>
> As discussed at:
> http://www.sourceware.org/ml/gdb-patches/2013-04/msg00564.html
>
> gdb/ChangeLog:
>
> * dwarf2read.c (get_DW_AT_signature_type): Add ARI marker.
>
> Tested by rebuilding GDB. Checked in.
>
> ---
> gdb/ChangeLog | 4 ++++
> gdb/dwarf2read.c | 4 ++--
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index 630fd1d..429445f 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,3 +1,7 @@
> +2013-04-29 Joel Brobecker <brobecker@adacore.com>
> +
> + * dwarf2read.c (get_DW_AT_signature_type): Add ARI marker.
> +
> 2013-04-28 Yao Qi <yao@codesourcery.com>
>
> * solib-dsbt.c (fetch_loadmap): Re-indent.
> diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
> index 37b7dc4..bd162e6 100644
> --- a/gdb/dwarf2read.c
> +++ b/gdb/dwarf2read.c
> @@ -17924,8 +17924,8 @@ get_signatured_type (struct die_info *die,
ULONGEST
> signature,
> reading in and processing the type unit if necessary. */
>
> static struct type *
> -get_DW_AT_signature_type (struct die_info *die, struct attribute *attr,
> - struct dwarf2_cu *cu)
> +get_DW_AT_signature_type /* ARI: editCase */
> + (struct die_info *die, struct attribute *attr, struct dwarf2_cu *cu)
> {
> /* Yes, DW_AT_signature can use a non-ref_sig8 reference. */
> if (is_ref_attr (attr))
> --
> 1.7.10.4