gdb: remove bpstat typedef, rename bpstats to bpstat

I don't find that the bpstat typedef, which hides a pointer, is
particularly useful.  In fact, it confused me many times, and I just see
it as something to remember that adds cognitive load.  Also, with C++,
we might want to be able to pass bpstats objects by const-reference, not
necessarily by pointer.

So, remove the bpstat typedef and rename struct bpstats to bpstat (since
it represents one bpstat, it makes sense that it is singular).

Change-Id: I52e763b6e54ee666a9e045785f686d37b4f5f849
This commit is contained in:
Simon Marchi 2021-11-05 15:29:20 -04:00
parent 9be90c6894
commit 313f3b21cb
23 changed files with 115 additions and 117 deletions

View file

@ -669,7 +669,7 @@ continue_command (const char *args, int from_tty)
stopped at. */
if (args != NULL)
{
bpstat bs = NULL;
bpstat *bs = nullptr;
int num, stat;
int stopped = 0;
struct thread_info *tp;
@ -1827,7 +1827,7 @@ finish_command (const char *arg, int from_tty)
static void
info_program_command (const char *args, int from_tty)
{
bpstat bs;
bpstat *bs;
int num, stat;
ptid_t ptid;
process_stratum_target *proc_target;