This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA/DWARF v2] Fix breakpoint add on inlined function using function name.
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Xavier Roirand <roirand at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 3 Jan 2018 08:44:18 +0400
- Subject: Re: [RFA/DWARF v2] Fix breakpoint add on inlined function using function name.
- Authentication-results: sourceware.org; auth=none
- References: <1513776096-19313-1-git-send-email-roirand@adacore.com>
Hi Xavier,
> gdb/ChangeLog:
>
> * dwarf2read.c (scan_partial_symbols, add_partial_symbol)
> (add_partial_subprogram, load_partial_dies): Add
> DW_TAG_inlined_subroutine handling.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.ada/bp_inlined_func: New testcase.
The compiler is detecting a bug in your code:
> @@ -9412,7 +9415,7 @@ add_partial_subprogram (struct partial_die_info *pdi,
> CORE_ADDR *lowpc, CORE_ADDR *highpc,
> int set_addrmap, struct dwarf2_cu *cu)
> {
> - if (pdi->tag == DW_TAG_subprogram)
> + if (pdi->tag == DW_TAG_subprogram || DW_TAG_inlined_subroutine)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
It should be "|| pdi->tag == DW_TAG_inlined_subroutine".
Can you re-send a fixed version, please?
--
Joel