[PATCH] Fix calling gcore when gdb is not in $PATH.
Luis Machado
lgustavo@codesourcery.com
Fri Oct 11 14:10:00 GMT 2013
Hi,
Currently, the generated gcore scripts assume the gdb binary they need
to call is present in $PATH, but this may not always be true.
If you want to call the gcore scripts from a relative directory, for
example, it will fail to locate the gdb binary. The attached patch fixes
this.
Before the patch:
$ /tmp/gdb_test_install/bin/gcoreblahbleh 20000
/tmp/gdb_test_install/bin/gcoreblahbleh: 54:
/tmp/gdb_test_install/bin/gcoreblahbleh: gdbblahbleh: not found
gcoreblahbleh: failed to create core.20000
After the patch:
$ /tmp/gdb_test_install/bin/gcoreblahbleh 20000
warning: unable to open /proc file '/proc/20000/status'
warning: unable to open /proc file '/proc/20000/status'
ptrace: No such process.
You can't do that without a process to debug.
The program is not being run.
gcoreblahbleh: failed to create core.20000
How does it look?
Regards,
Luis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcore.diff
Type: text/x-patch
Size: 654 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20131011/69e5f294/attachment.bin>
More information about the Gdb-patches
mailing list