X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gdb%2Fsymfile-mem.c;h=51a75541e52d22514c512b0f652a8e4d4a44c436;hb=762c164d754fc456aa4764d2ed19cc4a3ec625fb;hp=1653628e6835211804512094af8fd48a02697b26;hpb=37e136b1684929df204ddd09c38978c705fa7228;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c index 1653628e68..51a75541e5 100644 --- a/gdb/symfile-mem.c +++ b/gdb/symfile-mem.c @@ -1,6 +1,6 @@ /* Reading symbol files from memory. - Copyright (C) 1986-2018 Free Software Foundation, Inc. + Copyright (C) 1986-2019 Free Software Foundation, Inc. This file is part of GDB. @@ -49,7 +49,7 @@ #include "target.h" #include "value.h" #include "symfile.h" -#include "observer.h" +#include "observable.h" #include "auxv.h" #include "elf/common.h" #include "gdb_bfd.h" @@ -99,7 +99,7 @@ symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr, error (_("Failed to read a valid object file image from memory.")); /* Manage the new reference for the duration of this function. */ - gdb_bfd_ref_ptr nbfd_holder = new_bfd_ref (nbfd); + gdb_bfd_ref_ptr nbfd_holder = gdb_bfd_ref_ptr::new_reference (nbfd); xfree (bfd_get_filename (nbfd)); if (name == NULL) @@ -187,7 +187,7 @@ add_vsyscall_page (struct target_ops *target, int from_tty) char *name = xstrprintf ("system-supplied DSO at %s", paddress (target_gdbarch (), vsyscall_range.start)); - TRY + try { /* Pass zero for FROM_TTY, because the action of loading the vsyscall DSO was not triggered by the user, even if the @@ -198,11 +198,10 @@ add_vsyscall_page (struct target_ops *target, int from_tty) name, 0 /* from_tty */); } - CATCH (ex, RETURN_MASK_ALL) + catch (const gdb_exception &ex) { exception_print (gdb_stderr, ex); } - END_CATCH } } @@ -219,5 +218,5 @@ _initialize_symfile_mem (void) /* Want to know of each new inferior so that its vsyscall info can be extracted. */ - observer_attach_inferior_created (add_vsyscall_page); + gdb::observers::inferior_created.attach (add_vsyscall_page); }