Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:tabraham1:branches:home:jeff_mahoney:crash-python:devel
gdb
0004-symfile-delay-new-objfile-event-until-afte...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0004-symfile-delay-new-objfile-event-until-after-relocati.patch of Package gdb
From eafb6637e397285a620fbc18746a08cef8832b8d Mon Sep 17 00:00:00 2001 From: Jeffrey Mahoney <jeffm@suse.com> Date: Sat, 13 Apr 2019 23:11:16 -0400 Subject: [PATCH 04/17] symfile: delay new objfile event until after relocation Acked-by: Jeff Mahoney <jeffm@suse.com> --- gdb/symfile-add-flags.h | 4 ++++ gdb/symfile.c | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/symfile-add-flags.h b/gdb/symfile-add-flags.h index 5faab96a9e4..a99263cd864 100644 --- a/gdb/symfile-add-flags.h +++ b/gdb/symfile-add-flags.h @@ -50,6 +50,10 @@ enum symfile_add_flag : unsigned Without this flag, symbol_file_add_with_addrs asks a confirmation only for a main symbol file replacing a file having symbols. */ SYMFILE_ALWAYS_CONFIRM = 1 << 6, + + /* Do not execute the new objfile callback event in + symbol_file_add_with_addrs. */ + SYMFILE_NO_EVENT = 1 << 7, }; DEF_ENUM_FLAGS_TYPE (enum symfile_add_flag, symfile_add_flags); diff --git a/gdb/symfile.c b/gdb/symfile.c index 0c8d574e603..3fcffc6a284 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1129,7 +1129,8 @@ symbol_file_add_with_addrs (bfd *abfd, const char *name, finish_new_objfile (objfile, add_flags); - gdb::observers::new_objfile.notify (objfile); + if (!(add_flags & SYMFILE_NO_EVENT)) + gdb::observers::new_objfile.notify (objfile); bfd_cache_close_all (); return (objfile); @@ -2259,6 +2260,7 @@ add_symbol_file_command (const char *args, int from_tty) offset = parse_and_eval_address (arg); seen_offset = true; + add_flags |= SYMFILE_NO_EVENT; } else if (strcmp (arg, "--") == 0) stop_processing_options = true; @@ -2331,6 +2333,8 @@ add_symbol_file_command (const char *args, int from_tty) set_objfile_default_section_offset (objf, section_addrs, offset); current_program_space->add_target_sections (objf); + if (seen_offset) + gdb::observers::new_objfile.notify (objf); /* Getting new symbols may change our opinion about what is frameless. */ -- 2.37.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor