Re: [PATCH 1/3] Check function is GC'ed

Yao Qi
2014-09-15T08:06:24Z

Yao Qi <yao@codesourcery.com> writes:

> In this patch, we choose 'lowpc' got in read_file_scope to check
> whether 'lowpc' is greater than zero. If it isn't, address zero really
> means the function is GC'ed. In this patch, we pass 'lowpc' in
> read_file_scope through handle_DW_AT_stmt_list and dwarf_decode_lines,
> and to dwarf_decode_lines_1 finally.
>
> This patch fixes the fail above. This patch also covers the path that
> partial symbol isn't used, which is tested by starting gdb with
> --readnow option.
>
> It is regression tested on x86-linux with
> target_board=dwarf4-gdb-index, and arm-none-eabi. OK to apply?
>
> gdb:
>
> 2014-08-27 Yao Qi <yao@codesourcery.com>
>
> * dwarf2read.c (dwarf_decode_lines): Update declaration.
> (handle_DW_AT_stmt_list): Add argument 'lowpc'. Update
> comments. Callers update.
> (dwarf_decode_lines): Likewise.
> (dwarf2_build_include_psymtabs): Likewise.
> (dwarf_decode_lines_1): Add argument 'lowpc'. Update
> comments. Skip the line table if 'lowpc' is greater than
> 'address'.
>
> gdb/testsuite:
>
> 2014-08-27 Yao Qi <yao@codesourcery.com>
>
> * gdb.base/break-on-linker-gcd-function.exp: Move test into new
> proc set_breakpoint_on_gcd_function. Invoke
> set_breakpoint_on_gcd_function. Restart GDB with --readnow and
> invoke set_breakpoint_on_gcd_function again.

Ping. https://sourceware.org/ml/gdb-patches/2014-08/msg00595.html

--
Yao (齐尧)