[Bug gdb/25152] New: add-symbol-file -s adds symbols that were not requested

iii at linux dot ibm.com sourceware-bugzilla@sourceware.org
Thu Oct 31 09:55:00 GMT 2019


            Bug ID: 25152
           Summary: add-symbol-file -s adds symbols that were not
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: gdb
          Assignee: unassigned at sourceware dot org
          Reporter: iii at linux dot ibm.com
  Target Milestone: ---

I'm debugging a kernel module with gdb. For that I'm using a modified
lx-symbols script that tells gdb addresses of all loadable sections
using the following command:

(gdb) add-symbol-file arch/s390/lib/test_unwind.ko 0x3ff8005e104 \
                      -s .note.gnu.build-id 0x3ff8005f000 \
                      -s .note.Linux 0x3ff8005f024 \
                      -s .text 0x3ff8005e108 \
                      -s .text.unlikely 0x3ff8005e400 \
                      -s .rodata 0x3ff8005f03c \
                      -s .rodata.str1.2 0x3ff8005f04e \
                      -s __mcount_loc 0x3ff8005f640 \
                      -s .gnu.linkonce.this_module 0x3ff80060000 \
                      -s .symtab 0x3ff80058000 \
                      -s .strtab 0x3ff800588a0

In general this works great, but it has a nasty side-effect of adding
unwanted symbols:

(gdb) bt
#0  __unwind_start (state=0x3e000483860, task=0x0 <__UNIQUE_ID_license22>,
regs=0x0 <__UNIQUE_ID_license22>, sp=0) at arch/s390/kernel/unwind_bc.c:114

(gdb) info symbol 0x0
__UNIQUE_ID_license22 in section .modinfo of arch/s390/lib/test_unwind.ko

Note that I never requested symbols from .modinfo section. This does not
happen if I remove some random unrelated sections from the command:

(gdb) add-symbol-file arch/s390/lib/test_unwind.ko 0x3ff8005e104 \
                      -s .text 0x3ff8005e108 \
                      -s .text.unlikely 0x3ff8005e400

(gdb) bt
#0  __unwind_start (state=0x3e000483860, task=0x0, regs=0x0, sp=0) at

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Gdb-prs mailing list