Hi Matthew,
thanks for the help :)
On 04/04/15 21:30, Matthew Brush wrote:
On 15-04-04 03:45 PM, lmx 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""
"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?
Hi,
Geany doesn't have a debugger or Valgrind support, so I guess you are using one of the debugging plugins? I would try to clean build and get it running outside of Geany from the command line, after your build issues are sorted out
I am running geany with the gdb plugin debugger made by Alexander Petukhov, I think is the only plugin for gdb, i think?! I have runned valgrind outside of geany(in one terminal), but with geany opened...i don't know if geany stores any config data...
then I closed geany, opened it again later, continuing debugging my application...
for what I understand Valgrind uses the linux-vdso.so.1 concept to trace syscalls...which is what i was doing after-all with malloc, calloc and fopen, etc... I don't know if valgrind in the running process sets any ENV VAR, and maybe that var is used by geany plugin...i don't know.
but after running my code against valgrind with geany opened, closed geany, and after opened it again...i am unnable to debug in geany with the errors that I show before..
but i can use gcc and make, to compile and link against glibc, without anny issue or warning.
(ex. it looks like you're linking "eglibc" in your home directory rather than some system-wide C stdlib, maybe on purpose?), I bet it will work with any of the debugging plugins. Valgrind should be totally unrelated to any of this.
the eglibc is a version of a glibc type used in Debian, which will be replaced in debian 8 by the glibc version of gnu.In fact eglibc is a gnu version with some improvements..its the same thing..
I am not running glibc in my home dir...that is the problem...something that is messing with geany in some location..and makes it thinking that glibc is in another location...because of that geany cannot find the code from glibc, i think...and trows a error..
I checked the HOME, PATH end vars, and its ok. I have donne a ldd(on my app *parsers*) to check against what dinamic libraries is have been linked, and its ok :S
~/Desktop/geany/lypus_parser$*ldd parsers* linux-vdso.so.1 (0x00007fffec1fe000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f83ac1a6000) /lib64/ld-linux-x86-64.so.2 (0x00007f83ac584000)
like I said , i can compile and link, even in geany, but i can't debug with geany...
I removed the executable file , then I compiled again, linked, and its run fine in console, but when i debug...i have that problem :(