diff options
author | Simon Marchi <simon.marchi@polymtl.ca> | 2020-10-07 08:13:44 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@polymtl.ca> | 2020-10-07 08:13:44 -0400 |
commit | 64c03bdb6ed0b1b44ebe6f9f151fde3af83bdf38 (patch) | |
tree | b6f6a5d392b81f6ec07afe1a4739899e4c96fbd3 /gdb/break-catch-sig.c | |
parent | 4b136f6f9aba2122868704bc18fd21e1d232392c (diff) | |
download | fsf-binutils-gdb-64c03bdb6ed0b1b44ebe6f9f151fde3af83bdf38.zip fsf-binutils-gdb-64c03bdb6ed0b1b44ebe6f9f151fde3af83bdf38.tar.gz fsf-binutils-gdb-64c03bdb6ed0b1b44ebe6f9f151fde3af83bdf38.tar.bz2 |
gdb: make signal_catch_counts a static array
I noticed that signal_catch_counts is a dynamically-allocated array of
constant size, allocated at startup an never freed. This might as well
be a statically-allocated array.
gdb/ChangeLog:
* break-catch-sig.c (signal_catch_counts): Make a static arrray.
(_initialize_break_catch_sig): Don't allocate array.
Change-Id: I220321df5ad6c1d2664ec9d483eea2dc1c979afe
Diffstat (limited to 'gdb/break-catch-sig.c')
-rw-r--r-- | gdb/break-catch-sig.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gdb/break-catch-sig.c b/gdb/break-catch-sig.c index e3e6f6f..5c7cdf1 100644 --- a/gdb/break-catch-sig.c +++ b/gdb/break-catch-sig.c @@ -60,7 +60,7 @@ static struct breakpoint_ops signal_catchpoint_ops; /* Count of each signal. */ -static unsigned int *signal_catch_counts; +static unsigned int signal_catch_counts[GDB_SIGNAL_LAST]; @@ -430,8 +430,6 @@ _initialize_break_catch_sig () { initialize_signal_catchpoint_ops (); - signal_catch_counts = XCNEWVEC (unsigned int, GDB_SIGNAL_LAST); - add_catch_command ("signal", _("\ Catch signals by their names and/or numbers.\n\ Usage: catch signal [[NAME|NUMBER] [NAME|NUMBER]...|all]\n\ |