diff options
author | Joel Brobecker <brobecker@gnat.com> | 2011-05-18 17:29:59 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2011-05-18 17:29:59 +0000 |
commit | 967cff168cc01f56912a7ef9b4755c1502ad761c (patch) | |
tree | e4695024d60a783071c725b37f35e0dbfc47a9db /gdb/ada-lang.c | |
parent | 0ba0c2b3438846e98e254ea2019901ea42bd986f (diff) | |
download | fsf-binutils-gdb-967cff168cc01f56912a7ef9b4755c1502ad761c.zip fsf-binutils-gdb-967cff168cc01f56912a7ef9b4755c1502ad761c.tar.gz fsf-binutils-gdb-967cff168cc01f56912a7ef9b4755c1502ad761c.tar.bz2 |
Remove one use of sprintf in ada-lang.c (print_it_exception)
This is just a minor cleanup of an ARI violation. As this affects
code that is normally unreachable (you'd need a runtime where
the unit providing the exception hook has been compiled without
debugging information), I tested this manually by commenting out
the code just above, thus forcing this part of the code to be
exercised.
gdb/ChangeLog:
* ada-lang.c (print_it_exception): Avoid use of sprintf.
Tested on x86_64-linux.
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index ebd5fd2..0435d33 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -10783,7 +10783,7 @@ print_it_exception (enum exception_catchpoint_kind ex, struct breakpoint *b) just replace the exception name by the generic string "exception" - it will read as "an exception" in the notification we are about to print. */ - sprintf (exception_name, "exception"); + memcpy (exception_name, "exception", sizeof ("exception")); } /* In the case of unhandled exception breakpoints, we print the exception name as "unhandled EXCEPTION_NAME", to make |