This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 256823 - "Debug Core File" Not Using Project's "Gdb Init File" Setting
Summary: "Debug Core File" Not Using Project's "Gdb Init File" Setting
Status: RESOLVED INCOMPLETE
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Maria Tishkova
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-26 17:32 UTC by dhauck
Modified: 2016-09-06 15:58 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dhauck 2015-11-26 17:32:11 UTC
I originally posted this to the 'cnd' forum but this didn't generate any discussion/response so I'm entering this here as a 'cnd' bug. Please see: http://forums.netbeans.org/viewtopic.php?t=64680&highlight= for the forum thread.

It appears as if a project's specified GDB init file is not being used when debugging a core file in NetBeans (8.0.2)? I have specifically set 'solib-search-path' in this file in order to have GDB properly identify and load symbols when debugging. This works fine when debugging interactively (i.e., starting the - or connecting to a remote - debugger) but the file is not leveraged when debugging core files (the shared libs are not loaded in this latter case). BTW, the debugger log also confirms this (where the gdb init file is shown being used when debugging interactively but not when debugging a core file).

Either change this to have the "debug core file" function use the active project's "Gdb Init File" value or have a new field in the "Debug Core File" dialog that allows the user to enter the path/value for the gdb init file to use.
Comment 1 Maria Tishkova 2016-08-31 20:37:58 UTC
Please attach gdb log file as from what I see in my gdb log GDB init file which is specified for the project is loaded when debugging core file^

his log is saved to: /tmp/gdb-cmds7438432974252833321.log

NB build: 20160816-f1a9faf455c2

=thread-group-added,id="i1"
~"GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1\n"
~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-linux-gnu\".\nType \"show configuration\" for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http://www.gnu.org/software/gdb/bugs/>.\n"
~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\".\n"
&"/home/masha/test2/.gdbinit: No such file or directory.\n"
(gdb) 
2-list-features
Comment 2 dhauck 2016-09-06 15:58:06 UTC
(In reply to Maria Tishkova from comment #1)
> Please attach gdb log file as from what I see in my gdb log GDB init file
> which is specified for the project is loaded when debugging core file^
> 
> his log is saved to: /tmp/gdb-cmds7438432974252833321.log
> 
> NB build: 20160816-f1a9faf455c2
> 
> =thread-group-added,id="i1"
> ~"GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1\n"
> ~"Copyright (C) 2014 Free Software Foundation, Inc.\n"
> ~"License GPLv3+: GNU GPL version 3 or later
> <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to
> change and redistribute it.\nThere is NO WARRANTY, to the extent permitted
> by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
> ~"This GDB was configured as \"x86_64-linux-gnu\".\nType \"show
> configuration\" for configuration details."
> ~"\nFor bug reporting instructions, please see:\n"
> ~"<http://www.gnu.org/software/gdb/bugs/>.\n"
> ~"Find the GDB manual and other documentation resources online
> at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
> ~"For help, type \"help\".\n"
> ~"Type \"apropos word\" to search for commands related to \"word\".\n"
> &"/home/masha/test2/.gdbinit: No such file or directory.\n"
> (gdb) 
> 2-list-features

Thanks for following up. I also see that this seems to be working in NB 8.1 (on Linux). Here's what I see:

This log is saved to: /tmp/gdb-cmds7444045603648965981.log

NB build: 201510222201

=thread-group-added,id="i1"
~"GNU gdb (NetAcquire(R) 20160418) 7.11\n"
~"Copyright (C) 2016 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"--host=x86_64-redhat-linux --target=i686-netacquire-linux-gnu\".\nType \"show configuration\" for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http://www.netacquire.com/support.htm>.\n"
~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\".\n"
=cmd-param-changed,param="verbose",value="on"
This log is saved to: /tmp/gdb-cmds7444045603648965981.log

NB build: 201510222201

=thread-group-added,id="i1"
~"GNU gdb (NetAcquire(R) 20160418) 7.11\n"
~"Copyright (C) 2016 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show co
pying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"--host=x86_64-redhat-linux --target=i686-netacquire-linux-gnu\".\nType \"show configuration\" for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http://www.netacquire.com/support.htm>.\n"
~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\".\n"
=cmd-param-changed,param="verbose",value="on"
=cmd-param-changed,param="solib-search-path",value="/home/dhauck/src/83x-nb81/temp/build/debug/bin"                                                                                                                       
(gdb)                                                                                                                                                           
NB build: 201510222201

=thread-group-added,id="i1"
~"GNU gdb (NetAcquire(R) 20160418) 7.11\n"
~"Copyright (C) 2016 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show co
pying\"\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"--host=x86_64-redhat-linux --target=i686-netacquire-linux-gnu\".\nType \"show configuration\" for configuration details."
~"\nFor bug reporting instructions, please see:\n"
~"<http://www.netacquire.com/support.htm>.\n"
~"Find the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\n"
~"For help, type \"help\".\n"
~"Type \"apropos word\" to search for commands related to \"word\".\n"
=cmd-param-changed,param="verbose",value="on"
=cmd-param-changed,param="solib-search-path",value="/home/dhauck/src/83x-nb81/temp/build/debug/bin"
(gdb)                                                                           

This is slightly different than what you see (the GDB log file doesn't actually indicate the location of my .gdbinit file, but it does appear to source the contents - as indicated by the verbose and solib-search-path commands above).

This can be marked as resolved (in NB 8.1).