aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorGary Benson <gbenson@redhat.com>2014-08-06 14:43:17 +0100
committerGary Benson <gbenson@redhat.com>2014-08-28 15:06:48 +0100
commit14ce3192392edde90aa444c153eacede6c1ba5c5 (patch)
treee6e11741811cdb89a13a87f6c7281b81a18fdb8a /gdb
parent50278d599da5f7536a1243a887c2a5fa12e099c1 (diff)
downloadgdb-14ce3192392edde90aa444c153eacede6c1ba5c5.zip
gdb-14ce3192392edde90aa444c153eacede6c1ba5c5.tar.gz
gdb-14ce3192392edde90aa444c153eacede6c1ba5c5.tar.bz2
Convert fatal to perror_with_name in IPA code
This commit converts four calls to fatal into calls to perror_with_name. perror_with_name calls error, which in IPA terminates with exit (1) rather than longjmp, so there is no functional change here. gdb/gdbserver/ChangeLog: * tracepoint.c (gdb_agent_init): Replace fatal with perror_with_name. (initialize_tracepoint): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/gdbserver/ChangeLog6
-rw-r--r--gdb/gdbserver/tracepoint.c10
2 files changed, 10 insertions, 6 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index dd89aab..9400b8a 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,5 +1,11 @@
2014-08-28 Gary Benson <gbenson@redhat.com>
+ * tracepoint.c (gdb_agent_init): Replace fatal with
+ perror_with_name.
+ (initialize_tracepoint): Likewise.
+
+2014-08-28 Gary Benson <gbenson@redhat.com>
+
* remote-utils.c (remote_prepare): Replace fatal with error.
2014-08-28 Gary Benson <gbenson@redhat.com>
diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c
index a9a4062..2e83d71 100644
--- a/gdb/gdbserver/tracepoint.c
+++ b/gdb/gdbserver/tracepoint.c
@@ -7290,7 +7290,7 @@ gdb_agent_init (void)
sigfillset (&new_mask);
res = pthread_sigmask (SIG_SETMASK, &new_mask, &orig_mask);
if (res)
- fatal ("pthread_sigmask (1) failed: %s", strerror (res));
+ perror_with_name ("pthread_sigmask (1)");
res = pthread_create (&thread,
NULL,
@@ -7299,7 +7299,7 @@ gdb_agent_init (void)
res = pthread_sigmask (SIG_SETMASK, &orig_mask, NULL);
if (res)
- fatal ("pthread_sigmask (2) failed: %s", strerror (res));
+ perror_with_name ("pthread_sigmask (2)");
while (helper_thread_id == 0)
usleep (1);
@@ -7380,7 +7380,7 @@ initialize_tracepoint (void)
pagesize = sysconf (_SC_PAGE_SIZE);
if (pagesize == -1)
- fatal ("sysconf");
+ perror_with_name ("sysconf");
gdb_tp_heap_buffer = xmalloc (5 * 1024 * 1024);
@@ -7399,9 +7399,7 @@ initialize_tracepoint (void)
}
if (addr == 0)
- fatal ("\
-initialize_tracepoint: mmap'ing jump pad buffer failed with %s",
- strerror (errno));
+ perror_with_name ("mmap");
gdb_jump_pad_buffer_end = gdb_jump_pad_buffer + pagesize * SCRATCH_BUFFER_NPAGES;
}