[Geany-Users] problems debugging

Lex Trotman elextr at xxxxx
Sun Apr 5 01:41:49 UTC 2015


On 5 April 2015 at 05:45, lmx <lmx1 at sapo.pt> wrote:
> Hi guys,
>
> I am running geany without problems for some years from now...
>
> today i experienced a weird thing...
>
> I decided to run vangrind against my code...
>
> well...now i can't use gdb :(
>
> I can compile and run the process, but not debug it...
>
> when I try to open a file with fopen or use calloc, or malloc, the geany
> debuger trows me some erros :(
>
> like this for malloc/calloc:
>
> "Can't find a source file
> "/home/aurel32/eglibc/eglibc-2.17/malloc/malloc.c""

That looks like an error from gdb not from Geany.

IIUC valgrind replaces the system malloc with its own for
instrumentation purposes.

So gdb is possibly trying to find the source file for the valgrind
library, and not surprisingly not finding it.

What happens if you run the *same* executable under gdb (doing the
same thing, ie stepping into the same code) from the command line?

Cheers
Lex

>
> "home/aurel"??? why? wtf..
>
> Another errors:
> when I try to access a FILE * pointer, for a regular file, that exists!
>
> Can't find a source file "/home/aurel32/eglibc/eglibc-2.17/libio/iofgets.c"
>
> I can't work...but I can compile??don't understand this...
>
> for what I understand valgrind is controlling the binary file, and this
> process, is afther that "corrupted" right ??
>
> but even then, deleting it, compiling again with gcc...running it ok,
> debuguing it...i can't.
>
> some info from valgrind report fther running my code against it:
>
> ==9423== Invalid write of size 4
> ==9423==    at 0x4E87037: _IO_vfscanf (vfscanf.c:1857)
> ==9423==    by 0x4E8EBC4: __isoc99_vsscanf (isoc99_vsscanf.c:43)
> ==9423==    by 0x4E8EB46: __isoc99_sscanf (isoc99_sscanf.c:32)
> ==9423==    by 0x40143B: file_to_holder (ihx.c:267)
> ==9423==    by 0x400E59: ihx_read (ihx.c:130)
> ==9423==    by 0x40159B: main (main.c:16)
> ==9423==  Address 0x51df44d is 13 bytes inside a block of size 16 alloc'd
> ==9423==    at 0x4C2B514: calloc (vg_replace_malloc.c:593)
> ==9423==    by 0x4013E1: file_to_holder (ihx.c:261)
> ==9423==    by 0x400E59: ihx_read (ihx.c:130)
> ==9423==    by 0x40159B: main (main.c:16)
> ==9423==
>
> why is geany looking for "/home/aurel32/eglibc/eglibc-2.17/malloc/malloc.c""
> when a malloc intruction occurrs in the code???
>
> does any one have any idea how to solve this?
>
> thanks in advance
>
> regards
> tux
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users


More information about the Users mailing list