This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Ignore data minimal symbols for breakpoint linespecs
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>, Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 23 Dec 2011 15:01:26 +0400
- Subject: Re: [RFA] Ignore data minimal symbols for breakpoint linespecs
- References: <1324548943-26819-1-git-send-email-brobecker@adacore.com>
> This patch fixes regressions that showed up gdb.ada/task_bp.exp.
>
> FAIL: gdb.ada/task_bp.exp: break pck.dummy_task - from psymtab
> FAIL: gdb.ada/task_bp.exp: break pck.dummy_task - from full symtab
This patch also happen to fix the gdb.base/fixsection.exp regression
reported by Jan :-). (http://www.sourceware.org/ml/gdb-patches/2011-12/msg00560.html)
-PASS: gdb.base/fixsection.exp: breakpoint at static_fun
+FAIL: gdb.base/fixsection.exp: breakpoint at static_fun
It's exactly the same problem: You have a data symbol named
static_fun inside the minimal symbol table of fixsectshr.sl. After
having found all symbols from the debugging info, GDB searched
the minimal symbol tables and found that data symbol too.
(gdb) b static_fun
Breakpoint 2 at 0x4005fc: static_fun. (2 locations)
(gdb) info break
Num Type Disp Enb Address What
2 breakpoint keep y <MULTIPLE>
2.1 y 0x00000000004005fc in static_fun
at /[...]/fixsection.c:26
2.2 y 0x00007ffff7dde798 <static_fun>
(gdb) info symbol 0x00007ffff7dde798
static_fun in section .bss of /[...]/fixsectshr.sl
> gdb/ChangeLog:
>
> * linespec.c (struct collect_minsyms) [list_mode]: New field.
> (add_minsym): Ignore data symbols if not in list mode.
> (search_minsyms_for_name): Set local.list_mode.
>
> gdb/testsuite/ChangeLog:
>
> * gdb.base/dmsym.c, gdb.base/dmsym_main.c, gdb.base/dmsym.exp:
> New files.
--
Joel