Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(358)

Unified Diff: sim/common/nrun.c

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sim/common/hw-ports.c ('k') | sim/common/sim-core.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sim/common/nrun.c
diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index b7dbbcf851bfbd34f9fb2a18e1c0640ed2882c95..aa60c42647ba9eff76ca91e61ac013450d965465 100644
--- a/sim/common/nrun.c
+++ b/sim/common/nrun.c
@@ -14,7 +14,23 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
+/* Need to be before general includes, to pick up e.g. _GNU_SOURCE. */
+#ifdef HAVE_CONFIG_H
+#include "cconfig.h"
+#include "tconfig.h"
+#endif
+
#include <signal.h>
+
+/* For strsignal. */
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+
#include "sim-main.h"
#include "bfd.h"
@@ -202,7 +218,8 @@ main (int argc, char **argv)
case sim_signalled:
case sim_stopped:
if (sigrc != 0)
- fprintf (stderr, "program stopped with signal %d.\n", sigrc);
+ fprintf (stderr, "program stopped with signal %d (%s).\n", sigrc,
+ strsignal (sigrc));
break;
case sim_exited:
« no previous file with comments | « sim/common/hw-ports.c ('k') | sim/common/sim-core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698