bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying structure members named like C keywords.


From: Emilio Lopes
Subject: Re: Displaying structure members named like C keywords.
Date: Fri, 22 Aug 2014 11:53:39 +0200

Hi Sergio,

thank you for taking a look at this issue.

> Would it be possible for you to come up with a simpler reproducer
> and send it to this list?  I am guessing there is something else in
> your code that might be triggering this.

I was hoping for this to be something simple...  Oh, well.

As you can imagine this is a somewhat larger codebase, with lots of
automatically generated code from XML files, using those structures.

But look at the transcript of this debugging session:

    $ arm-cortexa8-linux-gnueabi-gdb
build/master-device-control/master_device_control
    GNU gdb (GDB) 7.8
    Copyright (C) 2014 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
    and "show warranty" for details.
    This GDB was configured as "--host=x86_64-unknown-linux-gnu
--target=arm-cortexa8-linux-gnueabi".
    Type "show configuration" for configuration details.
    For bug reporting instructions, please see:
    <http://www.gnu.org/software/gdb/bugs/>.
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.
    For help, type "help".
    Type "apropos word" to search for commands related to "word"...
    Reading symbols from
build/master-device-control/master_device_control...done.
    (gdb) target remote 192.168.51.84:6666
    Remote debugging using 192.168.51.84:6666
    warning: Unable to find dynamic linker breakpoint function.
    GDB will be unable to debug shared library initializers
    and track explicitly loaded dynamic code.
    Cannot access memory at address 0x0
    0xb6fbadf0 in ?? ()
    (gdb) b hal-cmd-proxy.c:16
    Breakpoint 1 at 0x79ae0: file
/home/lopes/projects/hal/firmware-cmd-manager/master-device-control/hal-cmd-proxy/hal-cmd-proxy.c,
line 16.
    (gdb) c
    Continuing.
    warning: Could not load shared library symbols for 7 libraries,
e.g. /lib/libpthread.so.0.
    Use the "info sharedlibrary" command to see the complete listing.
    Do you need "set solib-search-path" or "set sysroot"?
    [New Thread 1562]
    [Switching to Thread 1562]

    Breakpoint 1, hal_cmd_proxy () at
/home/lopes/projects/hal/firmware-cmd-manager/master-device-control/hal-cmd-proxy/hal-cmd-proxy.c:16
    16
set_param_not_available(C_HAL_SLAVE_OPTMIN_START_OPTIMIZATION,
enabled);
    (gdb) info macro P_SLAVE_CMDS_OPTIONS_HAL_OPTMIN_ENABLED
    Defined at 
/home/lopes/projects/hal/firmware-cmd-manager/build/master-device-control/d-param-defs.h:8151
      included at
/home/lopes/projects/hal/firmware-cmd-manager/master-device-control/hal-cmd-proxy/hal-cmd-proxy.c:5
    #define P_SLAVE_CMDS_OPTIONS_HAL_OPTMIN_ENABLED
(&g_global_paramv[31].info.complex.paramv[29].info.complex.paramv[0].info.complex.paramv[1].info.complex.paramv[0])
    (gdb) p P_SLAVE_CMDS_OPTIONS_HAL_OPTMIN_ENABLED
    $1 = (struct param_t *) 0x10db9c <_slave_cmds_options_hal_optmin>
    (gdb) set sysroot ~/projects/hal/system/platform-tam3517/root-debug
    Reading symbols from
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/libpthread.so.0...done.
    Loaded symbols for
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/libpthread.so.0
    Reading symbols from
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/librt.so.1...done.
    Loaded symbols for
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/librt.so.1
    Reading symbols from
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/libstdc++.so.6...done.
    Loaded symbols for
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/libstdc++.so.6
    Reading symbols from
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/libm.so.6...done.
    Loaded symbols for
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/libm.so.6
    Reading symbols from
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/libgcc_s.so.1...done.
    Loaded symbols for
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/libgcc_s.so.1
    Reading symbols from
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/libc.so.6...done.
    Loaded symbols for
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/libc.so.6
    Reading symbols from
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/ld-linux.so.3...done.
    Loaded symbols for
/home/lopes/projects/hal/system/platform-tam3517/root-debug/lib/ld-linux.so.3
    (gdb) p P_SLAVE_CMDS_OPTIONS_HAL_OPTMIN_ENABLED
    A syntax error in expression, near
`complex.paramv[29].info.complex.paramv[0].info.complex.paramv[1].info.complex.paramv[0])'.
    (gdb) set sysroot ''
    warning: Unable to find dynamic linker breakpoint function.
    GDB will be unable to debug shared library initializers
    and track explicitly loaded dynamic code.
    (gdb) p P_SLAVE_CMDS_OPTIONS_HAL_OPTMIN_ENABLED
    $2 = (struct param_t *) 0x10db9c <_slave_cmds_options_hal_optmin>
    (gdb)

Problems come and go as I set/unset `sysroot'!!! (I'm debugging code
running on an ARM evaluation board remotely.)

I can live without setting `sysroot', but would be glad to help
finding the cause for this issue.

Can you give me a hint on what to look for from here?

Regards

 Emílio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]