}
}
- (*handler_p)
- = (struct gdb_osabi_handler *) xmalloc (sizeof (struct gdb_osabi_handler));
+ (*handler_p) = XNEW (struct gdb_osabi_handler);
(*handler_p)->next = NULL;
(*handler_p)->arch_info = arch_info;
(*handler_p)->osabi = osabi;
{
struct gdb_osabi_sniffer *sniffer;
- sniffer =
- (struct gdb_osabi_sniffer *) xmalloc (sizeof (struct gdb_osabi_sniffer));
+ sniffer = XNEW (struct gdb_osabi_sniffer);
sniffer->arch = arch;
sniffer->flavour = flavour;
sniffer->sniffer = sniffer_fn;
void
generic_elf_osabi_sniff_abi_tag_sections (bfd *abfd, asection *sect, void *obj)
{
- enum gdb_osabi *osabi = obj;
+ enum gdb_osabi *osabi = (enum gdb_osabi *) obj;
const char *name;
unsigned int sectsize;
char *note;
compressed section. But, since note sections are not compressed,
deferring the reading until we recognize the section avoids any
error. */
- note = alloca (sectsize);
+ note = (char *) alloca (sectsize);
/* .note.ABI-tag notes, used by GNU/Linux and FreeBSD. */
if (strcmp (name, ".note.ABI-tag") == 0)
int i;
for (i = 1; i < GDB_OSABI_INVALID; i++)
- if (strcmp (set_osabi_string, gdbarch_osabi_name (i)) == 0)
- {
- user_selected_osabi = i;
- user_osabi_state = osabi_user;
- break;
- }
+ {
+ enum gdb_osabi osabi = (enum gdb_osabi) i;
+
+ if (strcmp (set_osabi_string, gdbarch_osabi_name (osabi)) == 0)
+ {
+ user_selected_osabi = osabi;
+ user_osabi_state = osabi_user;
+ break;
+ }
+ }
if (i == GDB_OSABI_INVALID)
internal_error (__FILE__, __LINE__,
_("Invalid OS ABI \"%s\" passed to command handler."),