[Geany-Users] DebuggingSharedLibrary

Geoff Kaniuk geoff at xxxxx
Tue Jul 10 16:33:27 UTC 2018


I have finally got round to trying Lex's suggestion: set up the 
environment via .gdbinit.

Just in case its useful for others I had to:

1. Create a .gdbinit file with LD_LIBRARY_PATH settings in the directory 
locating the executable (EXDIR).

2. Ceate a .gdbinit file in $HOME with the command
add-auto-load-safe-path EXDIR

I was pleased that Debugger was able to find the source files for my 
library without me having to do any thing extra.

Its great to have a working debugger!

Many thanks,

Geoff

33 Ashbury Close, Cambridge CB1 3RW 01223 710582

On 19/06/18 01:02, Lex Trotman wrote:
> On Tue, 19 Jun 2018 at 08:04, Geoff Kaniuk <geoff at kaniuk.co.uk> wrote:
>>
>> Hi,
>>
>> I have been debugging C++ code with gdb in Geany via the Geany Terminal
>> Tab. I am now trying the Debugger Plugin and can debug stand alone
>> applications with a static library.
>>
>> I am now trying an application with a shared library and am having
>> problems setting environment variables (the GUI is misbehaving).
>>
>> Invoking gdb from the command line, I am used to including command line
>> options to specify the location of source directories, and the
>> documentation in  http://geanydbg.sourceforge.net/walkthrough.htm does
>> not mention this.
> 
> The gdb command thats invoked (gdb -i=mi) is fixed so you can't use
> any options, maybe GDB allows those to be set some other way.  Maybe
> it can be done in your init file
> https://sourceware.org/gdb/current/onlinedocs/gdb/Startup.html#Startup?
> 
>>
>> I appreciate that this is all a bit vague, but I thought that perhaps
>> these issues have already been discussed in the archives.
>>
>> If so, it would help if I could be given a hint as to where to start.
>> http:://news.gmane.org/gmane.editors.geany.general yields page not
>> found. Otherwise I can supply details and screenshots if need be.
>>
>> My system is Debian 9, Mate 1.16.2, AMD 64 bit
>> geany 1.29, geany-plugin-debugger 1.29
>>
>> Many thanks for any help,
>>
>> --
>> Geoff
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.geany.org
>> https://lists.geany.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
> 


More information about the Users mailing list