Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Paweł Wódkowski" <pwodkowski@pl.sii.eu>
To: "Richard Bunt" <richard.bunt@arm.com>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"Michał Urbański" <murbanski@pl.sii.eu>,
	"Sebastian Basierski" <sbasierski@pl.sii.eu>
Cc: "tim.wiederhake@intel.com" <tim.wiederhake@intel.com>,
	"dragos.carciumaru@intel.com" <dragos.carciumaru@intel.com>,
	Bernhard Heckel	<bernhard.heckel@intel.com>, nd <nd@arm.com>
Subject: Re: [PATCH v2 5/7] Fortran: Enable setting breakpoint on nested functions.
Date: Sun, 02 Dec 2018 22:16:00 -0000	[thread overview]
Message-ID: <d7777bc95ff24e1c8553fa16a9497b1f@pl.sii.eu> (raw)
In-Reply-To: <f349c0fd-ba61-c75d-d8d6-0d8dd907c8d4@arm.com>

Hi Richard,

Please see my comments.

On 28.11.2018 11:30, Richard Bunt wrote:
> Hi Pawel,
> 
> Thanks for this fix, I have a local patch for this so I'd be pleased to see an upstream variant.
> 
> Note: I cannot approve GDB patches but I thought I'd contribute a review since I was in this part
> of the code recently.
> 

Any review is great, especially from someone else developping for 
fortran these days ;)

> On 11/19/18 9:38 PM, Pawel Wodkowski wrote:
>> +# Test if we can set a breakpoint in a nested function
>> +gdb_breakpoint "sub_nested_outer"
>> +gdb_continue_to_breakpoint "sub_nested_outer" ".*local_int = 19"
>>   
>>   # Test if we can access local and
>>   # non-local variables defined one level up.
>> @@ -43,6 +46,10 @@ gdb_test "print local_int" "= 19" "print local_int in outer function"
>>   gdb_test "up"
>>   gdb_test "print index" "= 42" "print index at BP1, one frame up"
>>   
>> +# Test if we can set a breakpoint in a nested function
>> +gdb_breakpoint "sub_nested_inner"
>> +gdb_continue_to_breakpoint "sub_nested_inner" ".*local_int = 17"
>> +
>>   # Test if we can access local and
>>   # non-local variables defined two level up.
>>   gdb_breakpoint [gdb_get_line_number "! BP_inner"]
>>
> 
> This patch passed my local test case for this fix, so it looks good to me. The only test case that
> I have locally that I think would be of value here, would be to test that breakpoints can be set on
> multiple functions in the same contains block (i.e. both sub_nested_outer and sub_nested_inner),
> prior to program start. I found that such a test gives coverage to the changes in
> add_partial_subprogram as it tests the logic for subprograms which are linked as siblings.
> 
> What do you think?
> 

Yes, setting breakpoint before starting program is something that should 
work for sure so I checked it. I'm happy to say that it is working for 
both functions when set before MAIN__ :)
I will change the tests.


>>             /* brobecker/2007-12-26: Normally, only "external" DIEs are part
>>                of the global scope.  But in Ada, we want to be able to access
>> @@ -9206,6 +9208,8 @@ add_partial_subprogram (struct partial_die_info *pdi,
>>   	{
>>   	  if (pdi->tag == DW_TAG_entry_point)
>>   	    add_partial_entry_point (pdi, lowpc, highpc, set_addrmap, cu);
>> +	  else if (pdi->tag == DW_TAG_subprogram)
>> +	    add_partial_subprogram (pdi, lowpc, highpc, set_addrmap, cu);
>>   	  pdi = pdi->die_sibling;
>>   	}
>>       }
> 
> 
> Many thanks,
> 
> Rich
> 

Pawel


  reply	other threads:[~2018-12-02 22:16 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-19 21:40 [PATCH v2 1/7] DWARF: Don't add nameless modules to partial symbol table Pawel Wodkowski
2018-11-19 21:40 ` [PATCH v2 7/7] Fortran: Document scope operator Pawel Wodkowski
2018-11-20  5:01   ` Eli Zaretskii
2018-11-22 16:14     ` Paweł Wódkowski
2018-11-23 10:31       ` Eli Zaretskii
2018-11-19 21:40 ` [PATCH v2 4/7] Fortran: Ptype, print type extension Pawel Wodkowski
2019-02-01 13:06   ` Andrew Burgess
2018-11-19 21:40 ` [PATCH v2 3/7] Fortran: Accessing fields of inherited types via fully qualified name Pawel Wodkowski
     [not found]   ` <88ec6786-8834-7da2-207a-7392fd657e41@arm.com>
     [not found]     ` <53cac622aea64147b2c1cd25feb16bdd@pl.sii.eu>
2018-12-06 15:03       ` Richard Bunt
2018-12-09 20:41         ` Paweł Wódkowski
2019-01-16 11:11           ` Richard Bunt
2019-01-18  8:33             ` Paweł Wódkowski
     [not found]               ` <9c1d974d-d5f3-93f7-12b0-0c95ac264cde@arm.com>
2019-02-06 12:39                 ` Paweł Wódkowski
2018-11-19 21:40 ` [PATCH v2 6/7] Fortran: Nested functions, add scope parameter Pawel Wodkowski
2018-11-19 21:40 ` [PATCH v2 2/7] Dwarf: Fortran, support DW_TAG_entry_point Pawel Wodkowski
2018-11-27 22:09   ` Andrew Burgess
2018-12-02 21:32     ` Paweł Wódkowski
2018-11-19 21:40 ` [PATCH v2 5/7] Fortran: Enable setting breakpoint on nested functions Pawel Wodkowski
2018-11-28 10:32   ` Richard Bunt
2018-12-02 22:16     ` Paweł Wódkowski [this message]
2018-11-27 19:35 ` PING Re: [PATCH v2 1/7] DWARF: Don't add nameless modules to partial symbol table Pawel Wodkowski
2018-11-27 20:29 ` Simon Marchi
2018-11-27 21:42 ` Andrew Burgess
2018-12-02 21:01   ` Paweł Wódkowski

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=d7777bc95ff24e1c8553fa16a9497b1f@pl.sii.eu \
    --to=pwodkowski@pl.sii.eu \
    --cc=bernhard.heckel@intel.com \
    --cc=dragos.carciumaru@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=murbanski@pl.sii.eu \
    --cc=nd@arm.com \
    --cc=richard.bunt@arm.com \
    --cc=sbasierski@pl.sii.eu \
    --cc=tim.wiederhake@intel.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