mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-08-06 14:49:38 +08:00
Use gdb::checked_static_cast for watchpoints
This replaces some casts to 'watchpoint *' with checked_static_cast. In one spot, an unnecessary block is also removed. Approved-By: Simon Marchi <simon.marchi@efficios.com>
This commit is contained in:
@ -549,14 +549,13 @@ bppy_get_expression (PyObject *self, void *closure)
|
||||
{
|
||||
const char *str;
|
||||
gdbpy_breakpoint_object *obj = (gdbpy_breakpoint_object *) self;
|
||||
struct watchpoint *wp;
|
||||
|
||||
BPPY_REQUIRE_VALID (obj);
|
||||
|
||||
if (!is_watchpoint (obj->bp))
|
||||
Py_RETURN_NONE;
|
||||
|
||||
wp = (struct watchpoint *) obj->bp;
|
||||
watchpoint *wp = gdb::checked_static_cast<watchpoint *> (obj->bp);
|
||||
|
||||
str = wp->exp_string.get ();
|
||||
if (! str)
|
||||
|
Reference in New Issue
Block a user