Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <xdje42@gmail.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Pierre-Marie de Rodat <derodat@adacore.com>,
	 Kevin Buettner <kevinb@redhat.com>,
	 gdb-patches@sourceware.org
Subject: Re: [PATCH] Add proper handling for non-local references in nested functions
Date: Wed, 16 Sep 2015 16:16:00 -0000	[thread overview]
Message-ID: <m3bnd2tk6t.fsf@sspiff.org> (raw)
In-Reply-To: <20150902234947.GA575@adacore.com> (Joel Brobecker's message of	"Wed, 2 Sep 2015 16:49:47 -0700")

Joel Brobecker <brobecker@adacore.com> writes:
> Hi Pierre-Marie,
>
>> >From f8cb12e93bc4b317bf03dd31fc158cc05fc60367 Mon Sep 17 00:00:00 2001
>> From: Pierre-Marie de Rodat <derodat@adacore.com>
>> Date: Thu, 5 Feb 2015 17:00:06 +0100
>> Subject: [PATCH] DWARF: handle non-local references in nested functions
>> 
>> GDB's current behavior when dealing with non-local references in the
>> context of nested fuctions is approximative:
>> 
>>   - code using valops.c:value_of_variable read the first available stack
>>     frame that holds the corresponding variable (whereas there can be
>>     multiple candidates for this);
>> 
>>   - code directly relying on read_var_value will instead read non-local
>>     variables in frames where they are not even defined.
>> 
>> This change adds the necessary context to symbol reads (to get the block
>> they belong to) and to blocks (the static link property, if any) so that
>> GDB can make the proper decisions when dealing with non-local varibale
>> references.
>> 
>> gdb/ChangeLog:
>> 
>> 	* ada-lang.c (ada_read_var_value): Add a var_block argument
>> 	and pass it to default_read_var_value.
>> 	* block.c (block_static_link): New accessor.
>> 	* block.h (block_static_link): Declare it.
>> 	* buildsym.c (finish_block_internal): Add a static_link
>>       [...]
>
> This patch is causing a crash on some platforms, as explained by
> the revision log of the attached patch.
>
> gdb/ChangeLog:
>
>         * dwarf2loc.c (locexpr_get_frame_base): Renames
>         block_op_get_frame_base.
>         (dwarf2_block_frame_base_locexpr_funcs): Replace reference to
>         block_op_get_frame_base by reference to locexpr_get_frame_base.
>         (loclist_get_frame_base): New function, near identical copy of
>         locexpr_get_frame_base.
>         (dwarf2_block_frame_base_loclist_funcs): Replace reference to
>         block_op_get_frame_base by reference to loclist_get_frame_base.

LGTM.


  parent reply	other threads:[~2015-09-16 16:16 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-02 14:36 [PATCH] Add proper handling for non-local references in nested subprograms Pierre-Marie de Rodat
2015-03-10 15:26 ` Pedro Alves
2015-03-20 12:24   ` [PATCH] Add proper handling for non-local references in nested functions Pierre-Marie de Rodat
2015-05-29 12:28     ` Pedro Alves
2015-06-09 21:46       ` Pierre-Marie de Rodat
2015-07-22  9:16         ` Pierre-Marie de Rodat
2015-07-22 14:26           ` Doug Evans
2015-07-22 15:14             ` Pierre-Marie de Rodat
2015-07-26 17:28               ` Doug Evans
2015-07-22 17:58             ` Kevin Buettner
2015-07-23  1:36           ` Kevin Buettner
2015-07-23 10:44             ` Pierre-Marie de Rodat
2015-07-23 13:44               ` Kevin Buettner
2015-07-23 16:14                 ` Pierre-Marie de Rodat
2015-07-23 17:22                   ` Kevin Buettner
2015-07-23 17:33                     ` Pierre-Marie de Rodat
2015-07-23 17:51                       ` Kevin Buettner
2015-07-23 18:06                   ` Kevin Buettner
2015-07-23 18:23                     ` Kevin Buettner
2015-07-24 10:38                       ` Pierre-Marie de Rodat
2015-07-26 17:39                         ` Doug Evans
2015-07-24  9:26                     ` Pierre-Marie de Rodat
2015-07-26 20:35               ` Doug Evans
2015-07-31 10:53                 ` Pierre-Marie de Rodat
2015-08-10  8:34                   ` Pierre-Marie de Rodat
2015-08-13 15:03                     ` Doug Evans
2015-08-14  6:31                       ` Pierre-Marie de Rodat
2015-08-15  5:12                   ` Doug Evans
2015-08-15  6:21                     ` Doug Evans
2015-08-17 13:27                       ` Pierre-Marie de Rodat
2015-08-17 13:33                     ` Pierre-Marie de Rodat
2015-08-22 17:30                       ` Doug Evans
2015-08-25 12:14                         ` Pierre-Marie de Rodat
2015-09-02 23:50                       ` Joel Brobecker
2015-09-03  7:31                         ` Pierre-Marie de Rodat
2015-09-03 12:40                           ` Joel Brobecker
2015-09-03 14:03                             ` Pierre-Marie de Rodat
2015-09-16 16:16                         ` Doug Evans [this message]
2015-09-20 18:20                           ` pushed: " Joel Brobecker
2015-08-15  5:13                   ` Doug Evans

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=m3bnd2tk6t.fsf@sspiff.org \
    --to=xdje42@gmail.com \
    --cc=brobecker@adacore.com \
    --cc=derodat@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=kevinb@redhat.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