Message ID | 20190809191313.25200-1-pedromfc@linux.ibm.com |
---|---|
State | New |
Headers | show |
On Fri, 9 Aug 2019 16:13:13 -0300 Pedro Franco de Carvalho <pedromfc@linux.ibm.com> wrote: > This patch changes find_pc_partial_function so that *block is set to > nullptr when it fails, so that fill_in_stop_func won't access an > uninitialized variable. > > gdb/ChangeLog: > YYYY-MM-DD Pedro Franco de Carvalho <pedromfc@linux.ibm.com> > > * blockframe.c (find_pc_partial_function): Set *block to nullptr > when the function fails. Okay. Kevin
Kevin Buettner <kevinb@redhat.com> writes:
> Okay.
Thanks! Pushed.
--
Pedro Franco de Carvalho
>>>>> "Pedro" == Pedro Franco de Carvalho <pedromfc@linux.ibm.com> writes:
Pedro> This patch changes find_pc_partial_function so that *block is set to
Pedro> nullptr when it fails, so that fill_in_stop_func won't access an
Pedro> uninitialized variable.
Pedro> gdb/ChangeLog:
Pedro> YYYY-MM-DD Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
Pedro> * blockframe.c (find_pc_partial_function): Set *block to nullptr
Pedro> when the function fails.
Thanks. This is ok.
Tom
diff --git a/gdb/blockframe.c b/gdb/blockframe.c index fe7807b87a..4462274f46 100644 --- a/gdb/blockframe.c +++ b/gdb/blockframe.c @@ -331,6 +331,8 @@ find_pc_partial_function (CORE_ADDR pc, const char **name, CORE_ADDR *address, *address = 0; if (endaddr != NULL) *endaddr = 0; + if (block != nullptr) + *block = nullptr; return 0; }