diff options
author | Andrew Cagney <cagney@redhat.com> | 2005-04-26 14:57:22 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2005-04-26 14:57:22 +0000 |
commit | 109c3e397e8c8c131128f2bcf6cea8b6ce6f2d51 (patch) | |
tree | 50ab4aa65866fe207f9839270050bad311d89d0f /gdb/remote.c | |
parent | db5152b48da0a2ba407dac5516ab621063aa063c (diff) | |
download | gdb-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/remote.c')
-rw-r--r-- | gdb/remote.c | 45 |
1 files changed, 17 insertions, 28 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 7ad9ec2..450ef5b 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -2179,7 +2179,6 @@ static void remote_open_1 (char *name, int from_tty, struct target_ops *target, int extended_p, int async_p) { - struct gdb_exception ex; struct remote_state *rs = get_remote_state (); if (name == 0) error (_("To open a remote debug connection, you need to specify what\n" @@ -2282,14 +2281,17 @@ remote_open_1 (char *name, int from_tty, struct target_ops *target, been fixed - the function set_cmd_context() makes it possible for all the ``target ....'' commands to share a common callback function. See cli-dump.c. */ - ex = catch_exception (uiout, remote_start_remote, NULL, RETURN_MASK_ALL); - if (ex.reason < 0) - { - pop_target (); - if (async_p) - wait_forever_enabled_p = 1; - throw_exception (ex); - } + { + struct gdb_exception ex + = catch_exception (uiout, remote_start_remote, NULL, RETURN_MASK_ALL); + if (ex.reason < 0) + { + pop_target (); + if (async_p) + wait_forever_enabled_p = 1; + throw_exception (ex); + } + } if (async_p) wait_forever_enabled_p = 1; @@ -5357,28 +5359,15 @@ remote_get_thread_local_address (ptid_t ptid, CORE_ADDR lm, CORE_ADDR offset) return result; } else if (result == PACKET_UNKNOWN) - { - struct gdb_exception e - = { RETURN_ERROR, TLS_GENERIC_ERROR, - "Remote target doesn't support qGetTLSAddr packet" }; - throw_exception (e); - } + throw_error (TLS_GENERIC_ERROR, + _("Remote target doesn't support qGetTLSAddr packet")); else - { - struct gdb_exception e - = { RETURN_ERROR, TLS_GENERIC_ERROR, - "Remote target failed to process qGetTLSAddr request" }; - throw_exception (e); - - } + throw_error (TLS_GENERIC_ERROR, + _("Remote target failed to process qGetTLSAddr request")); } else - { - struct gdb_exception e - = { RETURN_ERROR, TLS_GENERIC_ERROR, - "TLS not supported or disabled on this target" }; - throw_exception (e); - } + throw_error (TLS_GENERIC_ERROR, + _("TLS not supported or disabled on this target")); /* Not reached. */ return 0; } |