aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/python/py-infthread.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/python/py-infthread.c b/gdb/python/py-infthread.c
index 66c3efd..c94d5b0 100644
--- a/gdb/python/py-infthread.c
+++ b/gdb/python/py-infthread.c
@@ -87,7 +87,9 @@ thpy_get_details (PyObject *self, void *ignore)
THPY_REQUIRE_VALID (thread_obj);
- const char *extra_info;
+ /* GCC can't tell that extra_info will always be assigned after the
+ 'catch', so initialize it. */
+ const char *extra_info = nullptr;
try
{
extra_info = target_extra_thread_info (thread_obj->thread);