mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 01:07:52 +00:00
gdb: more current_program_space->core_bfd() removal
This commit changes the signature of the gdbarch_core_info_proc method so that it takes a 'struct bfd *' as an extra argument. This argument is used to pass through the core file bfd pointer. Now, in corelow.c, when calling gdbarch_core_info_proc, we can pass through current_program_space->core_bfd() as the argument. Within the implementations, (Linux and FreeBSD) we can use this argument rather than having to access the core file through current_program_space. This reduces the use of global state, which I think is a good thing. There should be no user visible changes after this commit. Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
@@ -2554,11 +2554,15 @@ Method(
|
||||
comment="""
|
||||
Implement the "info proc" command for core files. Note that there
|
||||
are two "info_proc"-like methods on gdbarch -- one for core files,
|
||||
one for live targets.
|
||||
one for live targets. CBFD is the core file being read from.
|
||||
""",
|
||||
type="void",
|
||||
name="core_info_proc",
|
||||
params=[("const char *", "args"), ("enum info_proc_what", "what")],
|
||||
params=[
|
||||
("struct bfd *", "cbfd"),
|
||||
("const char *", "args"),
|
||||
("enum info_proc_what", "what")
|
||||
],
|
||||
predicate=True,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user