#include "solib-som.h"
#include "solib-pa64.h"
#include "regset.h"
+#include "exceptions.h"
#include "gdb_string.h"
}
/* Should never happen. */
- warning ("Unable to find branch in parameter relocation stub.\n");
+ warning (_("Unable to find branch in parameter relocation stub."));
return 0;
}
}
/* Should never happen. */
- warning ("Unable to find branch in parameter relocation stub.\n");
+ warning (_("Unable to find branch in parameter relocation stub."));
return 0;
}
/* Make sure we haven't walked outside the range of this stub. */
if (u != find_unwind_entry (loc))
{
- warning ("Unable to find branch in linker stub");
+ warning (_("Unable to find branch in linker stub"));
return orig_pc == pc ? 0 : pc & ~0x3;
}
return (hppa_extract_21 (prev_inst) + hppa_extract_17 (curr_inst)) & ~0x3;
else
{
- warning ("Unable to find ldil X,%%r1 before ble Y(%%sr4,%%r1).");
+ warning (_("Unable to find ldil X,%%r1 before ble Y(%%sr4,%%r1)."));
return orig_pc == pc ? 0 : pc & ~0x3;
}
}
stubsym = lookup_minimal_symbol_by_pc (loc);
if (stubsym == NULL)
{
- warning ("Unable to find symbol for 0x%lx", loc);
+ warning (_("Unable to find symbol for 0x%lx"), loc);
return orig_pc == pc ? 0 : pc & ~0x3;
}
libsym = lookup_minimal_symbol (DEPRECATED_SYMBOL_NAME (stubsym), NULL, NULL);
if (libsym == NULL)
{
- warning ("Unable to find library symbol for %s\n",
+ warning (_("Unable to find library symbol for %s."),
DEPRECATED_SYMBOL_NAME (stubsym));
return orig_pc == pc ? 0 : pc & ~0x3;
}
(read_register (HPPA_SP_REGNUM) - 8, 4)) & ~0x3;
else
{
- warning ("Unable to find restore of %%rp before bv (%%rp).");
+ warning (_("Unable to find restore of %%rp before bv (%%rp)."));
return orig_pc == pc ? 0 : pc & ~0x3;
}
}
GDB can set a breakpoint on this callback and find out what
exception event has occurred. */
-/* The name of the hook to be set to point to the callback function */
+/* The name of the hook to be set to point to the callback function. */
static char HP_ACC_EH_notify_hook[] = "__eh_notify_hook";
-/* The name of the function to be used to set the hook value */
+/* The name of the function to be used to set the hook value. */
static char HP_ACC_EH_set_hook_value[] = "__eh_set_hook_value";
/* The name of the callback function in end.o */
static char HP_ACC_EH_notify_callback[] = "__d_eh_notify_callback";
-/* Name of function in end.o on which a break is set (called by above) */
+/* Name of function in end.o on which a break is set (called by above). */
static char HP_ACC_EH_break[] = "__d_eh_break";
-/* Name of flag (in end.o) that enables catching throws */
+/* Name of flag (in end.o) that enables catching throws. */
static char HP_ACC_EH_catch_throw[] = "__d_eh_catch_throw";
-/* Name of flag (in end.o) that enables catching catching */
+/* Name of flag (in end.o) that enables catching catching. */
static char HP_ACC_EH_catch_catch[] = "__d_eh_catch_catch";
-/* The enum used by aCC */
+/* The enum used by aCC. */
typedef enum
{
__EH_NOTIFY_THROW,
ourselves.
0 => success
1 => failure */
-int
+static int
setup_d_pid_in_inferior (void)
{
CORE_ADDR anaddr;
msymbol = lookup_minimal_symbol ("__d_pid", NULL, symfile_objfile);
if (msymbol == NULL)
{
- warning ("Unable to find __d_pid symbol in object file.");
- warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
+ warning (_("Unable to find __d_pid symbol in object file.\n"
+ "Suggest linking executable with -g (links in /opt/langtools/lib/end.o)."));
return 1;
}
store_unsigned_integer (buf, 4, PIDGET (inferior_ptid)); /* FIXME 32x64? */
if (target_write_memory (anaddr, buf, 4)) /* FIXME 32x64? */
{
- warning ("Unable to write __d_pid");
- warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
+ warning (_("Unable to write __d_pid.\n"
+ "Suggest linking executable with -g (links in /opt/langtools/lib/end.o)."));
return 1;
}
return 0;
end.c
man entry for shl_findsym */
-CORE_ADDR
+static CORE_ADDR
find_stub_with_shl_get (struct minimal_symbol *function, CORE_ADDR handle)
{
struct symbol *get_sym, *symbol2;
target_read_memory (value_return_addr, (char *) &stub_addr, sizeof (stub_addr));
if (stub_addr <= 0)
- error ("call to __d_shl_get failed, error code is %d", err_value);
+ error (_("call to __d_shl_get failed, error code is %d"), err_value);
return (stub_addr);
}
}
/* Initialize exception catchpoint support by looking for the
- necessary hooks/callbacks in end.o, etc., and set the hook value to
- point to the required debug function
+ necessary hooks/callbacks in end.o, etc., and set the hook value
+ to point to the required debug function.
Return 0 => failure
1 => success */
/* Detect and disallow recursion. On HP-UX with aCC, infinite
recursion is a possibility because finding the hook for exception
callbacks involves making a call in the inferior, which means
- re-inserting breakpoints which can re-invoke this code */
+ re-inserting breakpoints which can re-invoke this code. */
static int recurse = 0;
if (recurse > 0)
if (!deprecated_hp_som_som_object_present)
return 0;
- /* We have a SOM executable with SOM debug info; find the hooks */
+ /* We have a SOM executable with SOM debug info; find the hooks. */
/* First look for the notify hook provided by aCC runtime libs */
/* If we find this symbol, we conclude that the executable must
should *not* be tried as an alternative.
ASSUMPTION: Only HP aCC code will have __eh_notify_hook defined.
- ASSUMPTION: HP aCC and g++ modules cannot be linked together. */
+ ASSUMPTION: HP aCC and g++ modules cannot be linked together. */
/* libCsup has this hook; it'll usually be non-debuggable */
msym = lookup_minimal_symbol (HP_ACC_EH_notify_hook, NULL, NULL);
}
else
{
- warning ("Unable to find exception callback hook (%s).", HP_ACC_EH_notify_hook);
- warning ("Executable may not have been compiled debuggable with HP aCC.");
- warning ("GDB will be unable to intercept exception events.");
+ warning (_("\
+Unable to find exception callback hook (%s).\n\
+Executable may not have been compiled debuggable with HP aCC.\n\
+GDB will be unable to intercept exception events."),
+ HP_ACC_EH_notify_hook);
eh_notify_hook_addr = 0;
hp_cxx_exception_support = 0;
return 0;
}
/* Next look for the notify callback routine in end.o */
- /* This is always available in the SOM symbol dictionary if end.o is linked in */
+ /* This is always available in the SOM symbol dictionary if end.o is
+ linked in. */
msym = lookup_minimal_symbol (HP_ACC_EH_notify_callback, NULL, NULL);
if (msym)
{
}
else
{
- warning ("Unable to find exception callback routine (%s).", HP_ACC_EH_notify_callback);
- warning ("Suggest linking executable with -g (links in /opt/langtools/lib/end.o).");
- warning ("GDB will be unable to intercept exception events.");
+ warning (_("\
+Unable to find exception callback routine (%s).\n\
+Suggest linking executable with -g (links in /opt/langtools/lib/end.o).\n\
+GDB will be unable to intercept exception events."),
+ HP_ACC_EH_notify_callback);
eh_notify_callback_addr = 0;
return 0;
}
shlib_info = bfd_get_section_by_name (symfile_objfile->obfd, "$SHLIB_INFO$");
if (shlib_info && (bfd_section_size (symfile_objfile->obfd, shlib_info) != 0))
{
- /* The minsym we have has the local code address, but that's not the
- plabel that can be used by an inter-load-module call. */
- /* Find solib handle for main image (which has end.o), and use that
- and the min sym as arguments to __d_shl_get() (which does the equivalent
- of shl_findsym()) to find the plabel. */
+ /* The minsym we have has the local code address, but that's not
+ the plabel that can be used by an inter-load-module call. */
+ /* Find solib handle for main image (which has end.o), and use
+ that and the min sym as arguments to __d_shl_get() (which
+ does the equivalent of shl_findsym()) to find the plabel. */
args_for_find_stub args;
static char message[] = "Error while finding exception callback hook:\n";
{
/* We can get here either if there is no plabel in the export list
for the main image, or if something strange happened (?) */
- warning ("Couldn't find a plabel (indirect function label) for the exception callback.");
- warning ("GDB will not be able to intercept exception events.");
+ warning (_("\
+Couldn't find a plabel (indirect function label) for the exception callback.\n\
+GDB will not be able to intercept exception events."));
return 0;
}
}
}
else
{
- warning ("Unable to find exception callback routine to set breakpoint (%s).", HP_ACC_EH_break);
- warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
- warning ("GDB will be unable to intercept exception events.");
+ warning (_("\
+Unable to find exception callback routine to set breakpoint (%s).\n\
+Suggest linking executable with -g (link in /opt/langtools/lib/end.o).\n\
+GDB will be unable to intercept exception events."),
+ HP_ACC_EH_break);
eh_break_addr = 0;
return 0;
}
}
else
{
- warning ("Unable to enable interception of exception catches.");
- warning ("Executable may not have been compiled debuggable with HP aCC.");
- warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
+ warning (_("\
+Unable to enable interception of exception catches.\n\
+Executable may not have been compiled debuggable with HP aCC.\n\
+Suggest linking executable with -g (link in /opt/langtools/lib/end.o)."));
return 0;
}
}
}
else
{
- warning ("Unable to enable interception of exception throws.");
- warning ("Executable may not have been compiled debuggable with HP aCC.");
- warning ("Suggest linking executable with -g (link in /opt/langtools/lib/end.o).");
+ warning (_("\
+Unable to enable interception of exception throws.\n\
+Executable may not have been compiled debuggable with HP aCC.\n\
+Suggest linking executable with -g (link in /opt/langtools/lib/end.o)."));
return 0;
}
}
/* there may be other cases in the future */
}
- /* Set the EH hook to point to the callback routine */
+ /* Set the EH hook to point to the callback routine. */
store_unsigned_integer (buf, 4, enable ? eh_notify_callback_addr : 0); /* FIXME 32x64 problem */
/* pai: (temp) FIXME should there be a pack operation first? */
if (target_write_memory (eh_notify_hook_addr, buf, 4)) /* FIXME 32x64 problem */
{
- warning ("Could not write to target memory for exception event callback.");
- warning ("Interception of exception events may not work.");
+ warning (_("\
+Could not write to target memory for exception event callback.\n\
+Interception of exception events may not work."));
return (struct symtab_and_line *) -1;
}
if (enable)
}
else
{
- warning ("Internal error: Invalid inferior pid? Cannot intercept exception events.");
+ warning (_("Internal error: Invalid inferior pid? Cannot intercept exception events."));
return (struct symtab_and_line *) -1;
}
}
store_unsigned_integer (buf, 4, enable ? 1 : 0);
if (target_write_memory (eh_catch_throw_addr, buf, 4)) /* FIXME 32x64? */
{
- warning ("Couldn't enable exception throw interception.");
+ warning (_("Couldn't enable exception throw interception."));
return (struct symtab_and_line *) -1;
}
break;
store_unsigned_integer (buf, 4, enable ? 1 : 0);
if (target_write_memory (eh_catch_catch_addr, buf, 4)) /* FIXME 32x64? */
{
- warning ("Couldn't enable exception catch interception.");
+ warning (_("Couldn't enable exception catch interception."));
return (struct symtab_and_line *) -1;
}
break;
default:
- error ("Request to enable unknown or unsupported exception event.");
+ error (_("Request to enable unknown or unsupported exception event."));
}
/* Copy break address into new sal struct, malloc'ing if needed. */
static void
hppa_hpux_sigtramp_frame_prev_register (struct frame_info *next_frame,
- void **this_prologue_cache,
- int regnum, int *optimizedp,
- enum lval_type *lvalp,
- CORE_ADDR *addrp,
- int *realnump, void *valuep)
+ void **this_prologue_cache,
+ int regnum, int *optimizedp,
+ enum lval_type *lvalp,
+ CORE_ADDR *addrp,
+ int *realnump, gdb_byte *valuep)
{
struct hppa_hpux_sigtramp_unwind_cache *info
= hppa_hpux_sigtramp_frame_unwind_cache (next_frame, this_prologue_cache);
if (!priv)
priv = hppa_init_objfile_priv_data (obj);
if (!priv)
- error ("Internal error creating objfile private data.\n");
+ error (_("Internal error creating objfile private data."));
/* Use the cached value if we have one. */
if (priv->dummy_call_sequence_addr != 0)
if (!priv)
priv = hppa_init_objfile_priv_data (obj);
if (!priv)
- error ("Internal error creating objfile private data.\n");
+ error (_("Internal error creating objfile private data."));
/* Use the cached value if we have one. */
if (priv->dummy_call_sequence_addr != 0)
find_pc_partial_function (SYMBOL_VALUE_ADDRESS (msym), &name,
&begin, &end);
- if (*name == 0 || begin == 0 || end == 0)
+ if (name == NULL || begin == 0 || end == 0)
continue;
if (target_read_memory (end - sizeof (insns), (char *)insns, sizeof (insns)) == 0)
}
}
- warning ("Cannot find suitable address to place dummy breakpoint; nested "
- "calls may fail.\n");
+ warning (_("Cannot find suitable address to place dummy breakpoint; nested "
+ "calls may fail."));
return addr - 4;
}
return it can return to the space of our trampoline. */
stubaddr = hppa_hpux_find_import_stub_for_addr (funcaddr);
if (stubaddr == 0)
- error ("Cannot call external function not referenced by application "
- "(no import stub).\n");
+ error (_("Cannot call external function not referenced by application "
+ "(no import stub).\n"));
regcache_cooked_write_unsigned (current_regcache, 22, stubaddr);
write_memory (sp, (char *)&hppa32_tramp, sizeof (hppa32_tramp));
*real_pc = hppa32_hpux_search_dummy_call_sequence (gdbarch, pc, &argreg);
if (*real_pc == 0)
- error ("Cannot make interspace call from here.\n");
+ error (_("Cannot make interspace call from here."));
regcache_cooked_write_unsigned (current_regcache, argreg, sp);
*real_pc = hppa64_hpux_search_dummy_call_sequence (gdbarch, pc, &argreg);
if (*real_pc == 0)
- error ("Cannot make interspace call from here.\n");
+ error (_("Cannot make interspace call from here."));
regcache_cooked_write_unsigned (current_regcache, argreg, sp);
/* If the SS_WIDEREGS flag is set, we really do need the full
`struct save_state'. */
if (flags & HPPA_HPUX_SS_WIDEREGS && len < HPPA_HPUX_SAVE_STATE_SIZE)
- error ("Register set contents too small");
+ error (_("Register set contents too small"));
if (flags & HPPA_HPUX_SS_WIDEREGS)
hppa_hpux_supply_ss_wide (regcache, regnum, save_state);