aboutsummaryrefslogtreecommitdiff
path: root/gdb/linux-thread-db.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2005-04-26 14:57:22 +0000
committerAndrew Cagney <cagney@redhat.com>2005-04-26 14:57:22 +0000
commit109c3e397e8c8c131128f2bcf6cea8b6ce6f2d51 (patch)
tree50ab4aa65866fe207f9839270050bad311d89d0f /gdb/linux-thread-db.c
parentdb5152b48da0a2ba407dac5516ab621063aa063c (diff)
downloadgdb-109c3e397e8c8c131128f2bcf6cea8b6ce6f2d51.zip
gdb-109c3e397e8c8c131128f2bcf6cea8b6ce6f2d51.tar.gz
gdb-109c3e397e8c8c131128f2bcf6cea8b6ce6f2d51.tar.bz2
2005-04-26 Andrew Cagney <cagney@gnu.org>
* remote.c (remote_open_1): Move "ex"'s declaration to where it is used. (remote_get_thread_local_address): Use throw_error, include a printed string. * linux-thread-db.c (thread_db_get_thread_local_address): Ditto. * dwarf2loc.c (dwarf_expr_tls_address): Ditto. * cli/cli-script.c (script_from_file): Mark up throw_error message. * linespec.c (symtab_from_filename, decode_variable): Ditto.
Diffstat (limited to 'gdb/linux-thread-db.c')
-rw-r--r--gdb/linux-thread-db.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/gdb/linux-thread-db.c b/gdb/linux-thread-db.c
index 30f9c94..fca0b04 100644
--- a/gdb/linux-thread-db.c
+++ b/gdb/linux-thread-db.c
@@ -1246,12 +1246,8 @@ thread_db_get_thread_local_address (ptid_t ptid,
/* glibc doesn't provide the needed interface. */
if (!td_thr_tls_get_addr_p)
- {
- struct gdb_exception e
- = { RETURN_ERROR, TLS_NO_LIBRARY_SUPPORT_ERROR, 0 };
-
- throw_exception (e);
- }
+ throw_error (TLS_NO_LIBRARY_SUPPORT_ERROR,
+ _("No TLS library support"));
/* Caller should have verified that lm != 0. */
gdb_assert (lm != 0);
@@ -1267,26 +1263,17 @@ thread_db_get_thread_local_address (ptid_t ptid,
#ifdef THREAD_DB_HAS_TD_NOTALLOC
/* The memory hasn't been allocated, yet. */
if (err == TD_NOTALLOC)
- {
/* Now, if libthread_db provided the initialization image's
address, we *could* try to build a non-lvalue value from
the initialization image. */
-
- struct gdb_exception e
- = { RETURN_ERROR, TLS_NOT_ALLOCATED_YET_ERROR, 0 };
-
- throw_exception (e);
- }
+ throw_error (TLS_NOT_ALLOCATED_YET_ERROR,
+ _("TLS not allocated yet"));
#endif
/* Something else went wrong. */
if (err != TD_OK)
- {
- struct gdb_exception e
- = { RETURN_ERROR, TLS_GENERIC_ERROR, thread_db_err_str (err) };
-
- throw_exception (e);
- }
+ throw_error (TLS_GENERIC_ERROR,
+ (("%s")), thread_db_err_str (err));
/* Cast assuming host == target. Joy. */
return (CORE_ADDR) address;
@@ -1295,13 +1282,8 @@ thread_db_get_thread_local_address (ptid_t ptid,
if (target_beneath->to_get_thread_local_address)
return target_beneath->to_get_thread_local_address (ptid, lm, offset);
else
- {
- struct gdb_exception e
- = { RETURN_ERROR, TLS_GENERIC_ERROR,
- "TLS not supported on this target" };
-
- throw_exception (e);
- }
+ throw_error (TLS_GENERIC_ERROR,
+ _("TLS not supported on this target"));
}
static void