diff options
author | Tom Tromey <tom@tromey.com> | 2020-10-29 15:04:33 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-10-29 15:04:38 -0600 |
commit | 004eecfdc7d9b47e8364719667c64edb22d12d44 (patch) | |
tree | e07c8b72a4dacff3b87850f2711ea06163c087be /gdb/progspace.h | |
parent | e39fb97114f28dbc0f38a9851437437bfc5c43a0 (diff) | |
download | binutils-004eecfdc7d9b47e8364719667c64edb22d12d44.zip binutils-004eecfdc7d9b47e8364719667c64edb22d12d44.tar.gz binutils-004eecfdc7d9b47e8364719667c64edb22d12d44.tar.bz2 |
Change program_space_empty_p to method on program_space
This changes program_space_empty_p to be a method on program_space.
It also changes it to return bool. I removed the "_p" suffix because
"empty" is a "well-known" C++ method name.
gdb/ChangeLog
2020-10-29 Tom Tromey <tom@tromey.com>
* inferior.c (delete_inferior): Update.
* progspace.c (program_space::empty): Rename from
program_space_empty_p. Return bool.
* progspace.h (struct program_space) <empty>: New method.
(program_space_empty_p): Don't declare.
Diffstat (limited to 'gdb/progspace.h')
-rw-r--r-- | gdb/progspace.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/progspace.h b/gdb/progspace.h index 22805d7..fa5247f 100644 --- a/gdb/progspace.h +++ b/gdb/progspace.h @@ -293,6 +293,10 @@ struct program_space later be printed. */ void clear_solib_cache (); + /* Returns true iff there's no inferior bound to this program + space. */ + bool empty (); + /* Unique ID number. */ int num = 0; @@ -383,9 +387,6 @@ extern std::vector<struct program_space *>program_spaces; /* The current program space. This is always non-null. */ extern struct program_space *current_program_space; -/* Returns true iff there's no inferior bound to PSPACE. */ -extern int program_space_empty_p (struct program_space *pspace); - /* Copies program space SRC to DEST. Copies the main executable file, and the main symbol file. Returns DEST. */ extern struct program_space *clone_program_space (struct program_space *dest, |