Hello, gdb is not usable on GNU/Hurd since 7.1 (7.0 is working fine). For instance, running with version 7.2: $ gdb ./test GNU gdb (GDB) 7.2-debian Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /media/data/home/youpi/test...(no debugging symbols found)...done. (gdb) r Starting program: /media/data/home/youpi/test Can't fetch registers from thread bogus thread id 1: No such thread while with gdb 7.0: $ gdb ./test GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i486-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /media/data/home/youpi/test...done. (gdb) r Starting program: /media/data/home/youpi/test [New Thread 26750.5] Program received signal SIGSEGV, Segmentation fault. 0x0804846c in main () at test.c:2 2 *(int*)0 = 0; (test is just an int main(void){ *(int*)0=0; } program compiled with just -g)
Also reported here: <http://bugs.debian.org/579834>, and I had tracked it at <http://www.gnu.org/software/hurd/open_issues/gdb_head.html>. A year ago, I posted a patch that worked for me, <http://sourceware.org/ml/gdb-patches/2009-11/msg00581.html>, but I didn't bring this issue to an end. Still planning on getting back to this sometime. If you want, please review / test the patch.
Thanks, looking into it. Please file bugs regarding gdb and the hurd to this bugzilla in the future.
Note that a patch was checked as working by Thomas on http://sourceware.org/ml/gdb-patches/2009-11/msg00581.html but without answer.
Note that a patch was checked as working by Thomas on http://sourceware.org/ml/gdb-patches/2009-11/msg00581.html but without answer. I couldn't compile GDB on GNU/Hurd to test this patch (kernel panics all over the places as soon as I start linking anything large like gdb) or get a cross compiler working on my system, if you can test it and check Pedros concerns then that would be great.
I have uploaded a debian package on debian-ports, and our testers have confirmed that everything seems to be working fine.
Created attachment 5731 [details] Updated patch for gdb-7.2 on GNU/Hurd Attached is an updated patch for gdb-7.2, to make gdb fully functional on GNU/Hurd. The previously attached patch did not include the change from static to non-static to make the prune() function available outside the scope of gnu-nat.c
Please follow the contribution instructions here: http://sourceware.org/gdb/contribute/
(In reply to comment #7) > Please follow the contribution instructions here: > > http://sourceware.org/gdb/contribute/ What is missing from the comment and the patch? A problem description? And then send to gdb-pacthes@sourceware.org? Regarding coypright assignment this patch would be classified as a small change, right?
(In reply to comment #8) > (In reply to comment #7) > > Please follow the contribution instructions here: > > > > http://sourceware.org/gdb/contribute/ > > What is missing from the comment and the patch? A problem description? And then > send to gdb-pacthes@sourceware.org? Regarding coypright assignment this patch > would be classified as a small change, right? The patch is also missing a ChangeLog entry. Yes, I think it would be called a small change.
What is missing from the comment and the patch? A problem description? I'd like to see a problem description, all I have seen is "this fixes it" but no clear reasoning why it fixes. And then send to gdb-pacthes@sourceware.org? Yes please, I'm going on a 5 week vacation so if someone can commit it if you think it is good enough then that would be great. Regarding coypright assignment this patch would be classified as a small change, right? As Tromney noted, this is a tiny change.
(In reply to comment #10) > What is missing from the comment and the patch? A problem description? > > I'd like to see a problem description, all I have seen is "this fixes > it" but no clear reasoning why it fixes. > > And then send to gdb-patches@sourceware.org? > > Yes please, I'm going on a 5 week vacation so if someone can commit it > if you think it is good enough then that would be great. Aore informative description and the patch has now been sent to gdb-patches, see http://sourceware.org/ml/gdb-patches/2011-06/msg00458.html Please let me know if there is still something missing?
As per <http://sourceware.org/ml/gdb-patches/2011-07/msg00104.html> and confirmed in <http://sourceware.org/ml/gdb-patches/2011-07/msg00146.html> this patch is no longer needed with GDB HEAD; thus closing.