[RFA] Ignore data minimal symbols for breakpoint linespecs

Joel Brobecker brobecker@adacore.com
Fri Dec 23 11:03:00 GMT 2011


> 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



More information about the Gdb-patches mailing list