This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Patch: fix gdb_gcore.sh failure in ash/dash
- From: Qunying Pan <qpan at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: drow at false dot org, qunyingpan at gmail dot com
- Date: Fri, 09 Sep 2005 19:11:13 -0700
- Subject: Patch: fix gdb_gcore.sh failure in ash/dash
Hi,
Running gdb_gcore.sh in ash/dash fails with message "Hangup detected on
fd 0". The following patch fixes the problem. Acceptable?
Thanks,
Qunying
2005-09-09 Qunying Pan <qpan@mvista.com>
*gdb_gcore.sh: Invoke gdb in batch mode to fix gdb_gcore.sh failure
in ash/dash.
--- src/gdb/gdb_gcore.sh.orig 2005-09-09 16:56:04.000000000 -0700
+++ src/gdb/gdb_gcore.sh 2005-09-09 16:58:12.000000000 -0700
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -59,7 +59,7 @@ do
# Avoid need for temporary files by using funky "here
# document" feature of sh.
- /usr/bin/gdb > /dev/null << EOF
+ /usr/bin/gdb -batch -x /dev/stdin > /dev/null << EOF
attach $pid
gcore $name.$pid
detach