projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24fe764
)
Add explicit check for nullptr to target_announce_attach
author
Tom Tromey
<tom@tromey.com>
Sat, 8 Jan 2022 16:45:27 +0000
(09:45 -0700)
committer
Tom Tromey
<tom@tromey.com>
Sat, 8 Jan 2022 16:45:27 +0000
(09:45 -0700)
Lancelot pointed out that target_announce_attach was missing an
explicit check against nullptr. This patch adds it.
gdb/target.c
patch
|
blob
|
history
diff --git
a/gdb/target.c
b/gdb/target.c
index c25ce6925380c015acdd031e956d5d51ae4f13e2..950f2f08e315ef199f9e26a000cb8da53aeb28e4 100644
(file)
--- a/
gdb/target.c
+++ b/
gdb/target.c
@@
-3648,7
+3648,7
@@
target_announce_attach (int from_tty, int pid)
const char *exec_file = get_exec_file (0);
- if (exec_file)
+ if (exec_file
!= nullptr
)
printf_unfiltered ("Attaching to program: %s, %s\n", exec_file,
target_pid_to_str (ptid_t (pid)).c_str ());
else