#include "gdb-stabs.h"
#include "gdbtypes.h"
#include "demangle.h"
-#include "somsolib.h"
+#include "solib-som.h"
#include "gdb_assert.h"
#include "hppa-tdep.h"
/* Accessor macros to get at the fields. */
#define HPUX_SYMFILE_INFO(o) \
- ((struct hpread_symfile_info *)((o)->sym_private))
+ ((struct hpread_symfile_info *)((o)->deprecated_sym_private))
#define GNTT(o) (HPUX_SYMFILE_INFO(o)->gntt)
#define LNTT(o) (HPUX_SYMFILE_INFO(o)->lntt)
#define SLT(o) (HPUX_SYMFILE_INFO(o)->slt)
strcat (p, " ");
strcat (p, file_name);
- warning ("File not processed by pxdb--about to process now.\n");
+ warning (_("File not processed by pxdb--about to process now."));
status = system (p);
retval = (status == 0);
}
else
{
- warning ("pxdb not found at standard location: /opt/langtools/bin\ngdb will not be able to debug %s.\nPlease install pxdb at the above location and then restart gdb.\nYou can also run pxdb on %s with the command\n\"pxdb %s\" and then restart gdb.", file_name, file_name, file_name);
+ warning (_("pxdb not found at standard location: /opt/langtools/bin\ngdb will not be able to debug %s.\nPlease install pxdb at the above location and then restart gdb.\nYou can also run pxdb on %s with the command\n\"pxdb %s\" and then restart gdb."), file_name, file_name, file_name);
retval = 0;
}
if (header_section_size == (bfd_size_type) sizeof (DOC_info_PXDB_header))
{
buf = alloca (sizeof (DOC_info_PXDB_header));
+ memset (buf, 0, sizeof (DOC_info_PXDB_header));
if (!bfd_get_section_contents (sym_bfd,
header_section,
buf, 0,
header_section_size))
- error ("bfd_get_section_contents\n");
+ error (_("bfd_get_section_contents."));
tmp = bfd_get_32 (sym_bfd, (bfd_byte *) (buf + sizeof (int) * 4));
pxdbed = (tmp >> 31) & 0x1;
if (!pxdbed)
- error ("file debug header info invalid\n");
+ error (_("file debug header info invalid."));
do_pxdb = 0;
}
else
- error ("invalid $HEADER$ size in executable \n");
+ error (_("invalid $HEADER$ size in executable."));
}
else
{
buf = alloca (sizeof (PXDB_header));
+ memset (buf, 0, sizeof (PXDB_header));
if (!bfd_get_section_contents (sym_bfd,
header_section,
buf, 0,
header_section_size))
- error ("bfd_get_section_contents\n");
+ error (_("bfd_get_section_contents."));
tmp = bfd_get_32 (sym_bfd, (bfd_byte *) (buf + sizeof (int) * 3));
pxdbed = (tmp >> 31) & 0x1;
if (pxdbed)
do_pxdb = 0;
else
- error ("file debug header invalid\n");
+ error (_("file debug header invalid."));
}
else /*not pxdbed and doc OR not pxdbed and non doc */
do_pxdb = 1;
do { \
if( !told_objfile ) { \
told_objfile = 1; \
- warning ("\nIn object file \"%s\":\n", \
+ warning (_("\nIn object file \"%s\":"), \
objfile->name); \
} \
} while (0)
if (CURR_PROC_END > end_adr)
{
TELL_OBJFILE;
- warning ("Procedure \"%s\" [0x%x] spans file or module boundaries.", rtn_name, curr_pd);
+ warning (_("Procedure \"%s\" [0x%x] spans file or module boundaries."), rtn_name, curr_pd);
}
/* Add this routine symbol to the list in the objfile.
(CURR_MODULE_END == 0) || (CURR_MODULE_END == -1)))
{
TELL_OBJFILE;
- warning ("Module \"%s\" [0x%s] has non-standard addresses. It starts at 0x%s, ends at 0x%s, and will be skipped.",
+ warning (_("Module \"%s\" [0x%s] has non-standard addresses. It starts at 0x%s, ends at 0x%s, and will be skipped."),
mod_name_string, paddr_nz (curr_md), paddr_nz (start_adr), paddr_nz (end_adr));
/* On to next module */
curr_md++;
if (CURR_PROC_START < start_adr)
{
TELL_OBJFILE;
- warning ("Found procedure \"%s\" [0x%x] that is not in any file or module.",
+ warning (_("Found procedure \"%s\" [0x%x] that is not in any file or module."),
&vt_bits[(long) qPD[curr_pd].sbProc], curr_pd);
start_adr = CURR_PROC_START;
if (CURR_PROC_ISYM < start_sym)
if (VALID_FILE (curr_fd + 1) && (FILE_START (curr_fd + 1) <= end_adr))
{
TELL_OBJFILE;
- warning ("File \"%s\" [0x%x] has ending address after starting address of next file; adjusting ending address down.",
+ warning (_("File \"%s\" [0x%x] has ending address after starting address of next file; adjusting ending address down."),
full_name_string, curr_fd);
end_adr = FILE_START (curr_fd + 1) - 1; /* Is -4 (or -8 for 64-bit) better? */
}
if (VALID_MODULE (curr_md) && (CURR_MODULE_START <= end_adr))
{
TELL_OBJFILE;
- warning ("File \"%s\" [0x%x] has ending address after starting address of next module; adjusting ending address down.",
+ warning (_("File \"%s\" [0x%x] has ending address after starting address of next module; adjusting ending address down."),
full_name_string, curr_fd);
end_adr = CURR_MODULE_START - 1; /* Is -4 (or -8 for 64-bit) better? */
}
record_pst_syms (start_sym, end_sym);
if (NULL == pst)
- warning ("No symbols in psymtab for file \"%s\" [0x%x].", full_name_string, curr_fd);
+ warning (_("No symbols in psymtab for file \"%s\" [0x%x]."), full_name_string, curr_fd);
#ifdef DUMPING
if (dumping)
if (CURR_FILE_START < CURR_MODULE_START)
{
TELL_OBJFILE;
- warning ("File \"%s\" [0x%x] crosses beginning of module \"%s\".",
+ warning (_("File \"%s\" [0x%x] crosses beginning of module \"%s\"."),
&vt_bits[(long) qFD[curr_fd].sbFile],
curr_fd, mod_name_string);
if (CURR_FILE_END > end_adr)
{
TELL_OBJFILE;
- warning ("File \"%s\" [0x%x] crosses end of module \"%s\".",
+ warning (_("File \"%s\" [0x%x] crosses end of module \"%s\"."),
&vt_bits[(long) qFD[curr_fd].sbFile],
curr_fd, mod_name_string);
end_adr = CURR_FILE_END;
if (VALID_MODULE (curr_md + 1) && (MODULE_START (curr_md + 1) <= end_adr))
{
TELL_OBJFILE;
- warning ("Module \"%s\" [0x%x] has ending address after starting address of next module; adjusting ending address down.",
+ warning (_("Module \"%s\" [0x%x] has ending address after starting address of next module; adjusting ending address down."),
mod_name_string, curr_md);
end_adr = MODULE_START (curr_md + 1) - 1; /* Is -4 (or -8 for 64-bit) better? */
}
if (VALID_FILE (curr_fd + 1) && (FILE_START (curr_fd + 1) <= end_adr))
{
TELL_OBJFILE;
- warning ("Module \"%s\" [0x%x] has ending address after starting address of next file; adjusting ending address down.",
+ warning (_("Module \"%s\" [0x%x] has ending address after starting address of next file; adjusting ending address down."),
mod_name_string, curr_md);
end_adr = FILE_START (curr_fd + 1) - 1; /* Is -4 (or -8 for 64-bit) better? */
}
if (CURR_PROC_START < start_adr)
{
TELL_OBJFILE;
- warning ("Found procedure \"%s\" [0x%x] that is not in any file or module.",
+ warning (_("Found procedure \"%s\" [0x%x] that is not in any file or module."),
&vt_bits[(long) qPD[curr_pd].sbProc], curr_pd);
start_adr = CURR_PROC_START;
if (CURR_PROC_ISYM < start_sym)
record_pst_syms (start_sym, end_sym);
if (NULL == pst)
- warning ("No symbols in psymtab for module \"%s\" [0x%x].", mod_name_string, curr_md);
+ warning (_("No symbols in psymtab for module \"%s\" [0x%x]."), mod_name_string, curr_md);
#ifdef DUMPING
if (dumping)
start_adr = CURR_PROC_START;
end_adr = qPD[pxdb_header_p->pd_entries - 1].adrEnd;
TELL_OBJFILE;
- warning ("Found functions beyond end of all files and modules [0x%x].", curr_pd);
+ warning (_("Found functions beyond end of all files and modules [0x%x]."), curr_pd);
#ifdef DUMPING
if (dumping)
{
if (!doc_header.pxdbed)
{
/* This shouldn't happen if we check in "symfile.c". */
- warning ("File \"%s\" not processed by pxdb!", objfile->name);
+ warning (_("File \"%s\" not processed by pxdb!"), objfile->name);
return 0;
}
asection *vt_section, *slt_section, *lntt_section, *gntt_section;
/* Allocate struct to keep track of the symfile */
- objfile->sym_private =
- xmmalloc (objfile->md, sizeof (struct hpread_symfile_info));
- memset (objfile->sym_private, 0, sizeof (struct hpread_symfile_info));
+ objfile->deprecated_sym_private =
+ xmalloc (sizeof (struct hpread_symfile_info));
+ memset (objfile->deprecated_sym_private, 0, sizeof (struct hpread_symfile_info));
/* We haven't read in any types yet. */
DNTT_TYPE_VECTOR (objfile) = 0;
void
hpread_symfile_finish (struct objfile *objfile)
{
- if (objfile->sym_private != NULL)
+ if (objfile->deprecated_sym_private != NULL)
{
- xmfree (objfile->md, objfile->sym_private);
+ xfree (objfile->deprecated_sym_private);
}
}
\f
{
if (!typep.dntti.immediate)
{
- error ("error in hpread_type_translate\n.");
+ error (_("error in hpread_type_translate\n."));
return FT_VOID;
}
case HP_TYPE_GLOBAL_ANYPOINTER:
case HP_TYPE_LOCAL_ANYPOINTER:
default:
- warning ("hpread_type_translate: unhandled type code.\n");
+ warning (_("hpread_type_translate: unhandled type code."));
return FT_VOID;
}
}
{
DNTT_TYPE_VECTOR_LENGTH (objfile) = LNTT_SYMCOUNT (objfile) + GNTT_SYMCOUNT (objfile);
DNTT_TYPE_VECTOR (objfile) = (struct type **)
- xmmalloc (objfile->md, DNTT_TYPE_VECTOR_LENGTH (objfile) * sizeof (struct type *));
+ xmalloc (DNTT_TYPE_VECTOR_LENGTH (objfile) * sizeof (struct type *));
memset (&DNTT_TYPE_VECTOR (objfile)[old_len], 0,
(DNTT_TYPE_VECTOR_LENGTH (objfile) - old_len) *
sizeof (struct type *));
if (size_changed)
{
DNTT_TYPE_VECTOR (objfile) = (struct type **)
- xmrealloc (objfile->md,
- (char *) DNTT_TYPE_VECTOR (objfile),
+ xrealloc ((char *) DNTT_TYPE_VECTOR (objfile),
(DNTT_TYPE_VECTOR_LENGTH (objfile) * sizeof (struct type *)));
memset (&DNTT_TYPE_VECTOR (objfile)[old_len], 0,
/* Get space to record the next field/data-member. */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
fieldp = hpread_get_lntt (field.dnttp.index, objfile);
if (fieldp->dblock.kind != DNTT_TYPE_TEMPLATE_ARG)
{
- warning ("Invalid debug info: Template argument entry is of wrong kind");
+ warning (_("Invalid debug info: Template argument entry is of wrong kind"));
break;
}
/* Bump the count */
n_templ_args++;
/* Allocate and fill in a struct next_template */
t_new = (struct next_template *) alloca (sizeof (struct next_template));
+ memset (t_new, 0, sizeof (struct next_template));
t_new->next = t_list;
t_list = t_new;
t_list->arg.name = VT (objfile) + fieldp->dtempl_arg.name;
{
TYPE_FLAGS (type) |= TYPE_FLAG_INCOMPLETE;
if (fixup_class)
- warning ("Two classes to fix up for method?? Type information may be incorrect for some classes.");
+ warning (_("Two classes to fix up for method?? Type information may be incorrect for some classes."));
if (fixup_method)
- warning ("Two methods to be fixed up at once?? Type information may be incorrect for some classes.");
+ warning (_("Two methods to be fixed up at once?? Type information may be incorrect for some classes."));
fixup_class = type; /* remember this class has to be fixed up */
fixup_method = memtype; /* remember the method type to be used in fixup */
}
/* Get space to record this member function */
/* Note: alloca used; this will disappear on routine exit */
fn_new = (struct next_fn_field *) alloca (sizeof (struct next_fn_field));
+ memset (fn_new, 0, sizeof (struct next_fn_field));
fn_new->next = fn_list;
fn_list = fn_new;
/* Get space to record this static member */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
Code below is replicated from the case for FIELDs further
below, except that fieldp is replaced by fn_fieldp */
if (!fn_fieldp->dfield.a_union)
- warning ("Debug info inconsistent: FIELD of anonymous union doesn't have a_union bit set");
+ warning (_("Debug info inconsistent: FIELD of anonymous union doesn't have a_union bit set"));
/* Get space to record the next field/data-member. */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
{
/* Field of anonymous union; union is not inside a class */
if (!fn_fieldp->dsvar.a_union)
- warning ("Debug info inconsistent: SVAR field in anonymous union doesn't have a_union bit set");
+ warning (_("Debug info inconsistent: SVAR field in anonymous union doesn't have a_union bit set"));
/* Get space to record the next field/data-member. */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
{
/* Field of anonymous union; union is not inside a class */
if (!fn_fieldp->ddvar.a_union)
- warning ("Debug info inconsistent: DVAR field in anonymous union doesn't have a_union bit set");
+ warning (_("Debug info inconsistent: DVAR field in anonymous union doesn't have a_union bit set"));
/* Get space to record the next field/data-member. */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
if ((fn_fieldp->dblock.kind != DNTT_TYPE_MEMACCESS) &&
(fn_fieldp->dblock.kind != DNTT_TYPE_MEMENUM) &&
(fn_fieldp->dblock.kind != DNTT_TYPE_FUNC_TEMPLATE))
- warning ("Internal error: Unexpected debug record kind %d found following DNTT_GENFIELD",
+ warning (_("Internal error: Unexpected debug record kind %d found following DNTT_GENFIELD"),
fn_fieldp->dblock.kind);
}
/* walk to the next FIELD or GENFIELD */
/* Get space to record the next field/data-member. */
new = (struct nextfield *) alloca (sizeof (struct nextfield));
+ memset (new, 0, sizeof (struct nextfield));
new->next = list;
list = new;
{
/* neither field nor genfield ?? is this possible?? */
/* pai:: FIXME walk to the next -- how? */
- warning ("Internal error: unexpected DNTT kind %d encountered as field of struct",
+ warning (_("Internal error: unexpected DNTT kind %d encountered as field of struct"),
fieldp->dblock.kind);
- warning ("Skipping remaining fields of struct");
+ warning (_("Skipping remaining fields of struct"));
break; /* get out of loop of fields */
}
}
break;
i_new = (struct next_instantiation *) alloca (sizeof (struct next_instantiation));
+ memset (i_new, 0, sizeof (struct next_instantiation));
i_new->next = i_list;
i_list = i_new;
i_list->t = hpread_type_lookup (field, objfile);
if (!((dn_bufp->darray.arrayisbytes && dn_bufp->darray.elemisbytes) ||
(!dn_bufp->darray.arrayisbytes && !dn_bufp->darray.elemisbytes)))
{
- warning ("error in hpread_array_type.\n");
+ warning (_("error in hpread_array_type."));
return NULL;
}
else if (dn_bufp->darray.arraylength == 0x7fffffff)
/* Thread-local variable.
*/
SYMBOL_CLASS (sym) = LOC_HP_THREAD_LOCAL_STATIC;
- SYMBOL_BASEREG (sym) = CR27_REGNUM;
+ SYMBOL_BASEREG (sym) = HPPA_CR27_REGNUM;
if (objfile->flags & OBJF_SHARED)
{
priv = (struct hppa_objfile_private *)
objfile_data (objfile, hppa_objfile_priv_data);
if (priv == NULL)
- error ("Internal error in reading shared library information.");
+ error (_("Internal error in reading shared library information."));
so = ((struct hppa_objfile_private *) priv)->so_info;
if (so == NULL)
- error ("Internal error in reading shared library information.");
+ error (_("Internal error in reading shared library information."));
/* Thread-locals in shared libraries do NOT have the
* standard offset ("data_offset"), so we re-calculate
* to interpret the private shared-library data.
*/
SYMBOL_VALUE_ADDRESS (sym) = dn_bufp->dsvar.location +
- so_lib_thread_start_addr (so);
+ gdbarch_tdep (current_gdbarch)->solib_thread_start_addr (so);
}
}
break;