Explicit locations: introduce address locations
[deliverable/binutils-gdb.git] / gdb / python / py-finishbreakpoint.c
index 671fd234c38d9ff39d618c34116827f19acdd73d..e543bb32dd1fd769b8d9e4b4dc909aaeefc8335b 100644 (file)
@@ -169,8 +169,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
   struct frame_id frame_id;
   PyObject *internal = NULL;
   int internal_bp = 0;
-  CORE_ADDR finish_pc, pc;
-  char small_buf[100], *p;
+  CORE_ADDR pc;
   struct symbol *function;
 
   if (!PyArg_ParseTupleAndKeywords (args, kwargs, "|OO", keywords,
@@ -301,10 +300,7 @@ bpfinishpy_init (PyObject *self, PyObject *args, PyObject *kwargs)
       struct cleanup *back_to;
 
       /* Set a breakpoint on the return address.  */
-      finish_pc = get_frame_pc (prev_frame);
-      xsnprintf (small_buf, sizeof (small_buf), "*%s", hex_string (finish_pc));
-      p = small_buf;
-      location = new_linespec_location (&p);
+      location = new_address_location (get_frame_pc (prev_frame));
       back_to = make_cleanup_delete_event_location (location);
       create_breakpoint (python_gdbarch,
                          location, NULL, thread, NULL,
This page took 0.024143 seconds and 4 git commands to generate.