This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING**3] [PATCH] Fix an issue with the gdb step-over aka. "n" command


On 1/6/20 11:09 PM, Andrew Burgess wrote:
> * Bernd Edlinger <bernd.edlinger@hotmail.de> [2020-01-06 08:14:37 +0000]:
> 
>> Hi,
>>
>> I'd like to ping for this patch again.
>> The latest version (including testcase + changelog) can be found here:
>> https://sourceware.org/ml/gdb-patches/2019-12/msg01052.html
> 
> I think we should investigate tracking the line table is_stmt property
> better, as I suggested in another mail in this thread.
> 

Sure, no problem.
I am fully aware that this is just a workaround.

> I see you've provided some feedback to the patch I posted, I just
> haven't had time to look at it yet, but will try to get to it as soon
> as I can.
> 

Thanks, one additional thought I had about your patch:

I believe that we should also look at implementing the
variable-location-views.

I mean adding a view number to the record_line function.

That would mean adding PC.view in the line table.
That could in theory be used to find out if a location
view is inside a subroutine or in the main program,
even if the PC is the same, using the view number it
would be possible to find that out.

That would allow us to step to the return statement of the
inline function if we are stepping in the inline function
and to step over the whole inline if we want to.

The only part that is really missing for that is
the view number in addition to the PC where the inline
function ends.

Note there is already a view number where the inline
starts:

 <2><918>: Abbrev Number: 43 (DW_TAG_inlined_subroutine)
    <919>   DW_AT_abstract_origin: <0x9b5>
    <91d>   DW_AT_entry_pc    : 0x40117b
    <925>   DW_AT_GNU_entry_view: 0
    <926>   DW_AT_low_pc      : 0x40117b
    <92e>   DW_AT_high_pc     : 0xa
    <936>   DW_AT_call_file   : 1
    <937>   DW_AT_call_line   : 24
    <938>   DW_AT_call_column : 10
    <939>   DW_AT_sibling     : <0x965>


conceptually the subroutine starta at
DW_AT_entry_pc/DW_AT_GNU_entry_view
and ends at DW_AT_high_pc/<end view number>,
but the end view number is not yet specified.
That IMHO is what should be added here.


Bernd.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]