This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug breakpoints/19546] gdb crash calling exec in the inferior


https://sourceware.org/bugzilla/show_bug.cgi?id=19546

--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
(gdb) p execlp ("/bin/bash", "/bin/bash", (char *) 0)

Program received signal SIGSEGV, Segmentation fault.
0x00000000006285f8 in event_location_empty_p (location=0x0) at
/home/pedro/gdb/mygit/src/gdb/location.c:693
693       switch (EL_TYPE (location))
(top-gdb) bt 10
#0  0x00000000006285f8 in event_location_empty_p (location=0x0) at
/home/pedro/gdb/mygit/src/gdb/location.c:693
#1  0x00000000005af134 in update_breakpoints_after_exec () at
/home/pedro/gdb/mygit/src/gdb/breakpoint.c:3887
#2  0x0000000000631a15 in follow_exec (ptid=..., execd_pathname=0x1d58590
"/usr/bin/bash") at /home/pedro/gdb/mygit/src/gdb/infrun.c:1158
#3  0x0000000000638ee4 in handle_inferior_event_1 (ecs=0x7fffffffc2c0) at
/home/pedro/gdb/mygit/src/gdb/infrun.c:5276
#4  0x00000000006391fb in handle_inferior_event (ecs=0x7fffffffc2c0) at
/home/pedro/gdb/mygit/src/gdb/infrun.c:5361
#5  0x000000000063640c in fetch_inferior_event (client_data=0x0) at
/home/pedro/gdb/mygit/src/gdb/infrun.c:3921
#6  0x000000000065ceac in inferior_event_handler (event_type=INF_REG_EVENT,
client_data=0x0) at /home/pedro/gdb/mygit/src/gdb/inf-loop.c:44
#7  0x00000000004c64d8 in handle_target_event (error=0, client_data=0x0) at
/home/pedro/gdb/mygit/src/gdb/linux-nat.c:4352
#8  0x000000000065ad7f in handle_file_event (file_ptr=0x10b7d20, ready_mask=1)
at /home/pedro/gdb/mygit/src/gdb/event-loop.c:708
#9  0x000000000065b31d in gdb_wait_for_event (block=0) at
/home/pedro/gdb/mygit/src/gdb/event-loop.c:834
(More stack frames follow...)
(top-gdb) p location
$1 = (const struct event_location *) 0x0
(top-gdb) up
#1  0x00000000005af134 in update_breakpoints_after_exec () at
/home/pedro/gdb/mygit/src/gdb/breakpoint.c:3887
3887        if (event_location_empty_p (b->location))
(top-gdb) set print pretty on 
(top-gdb) p *b
$3 = {
  ops = 0xde3aa0 <momentary_breakpoint_ops>, 
  next = 0x1def1f0, 
  type = bp_call_dummy, 
  enable_state = bp_enabled, 
  disposition = disp_del, 
  number = 0, 
  loc = 0x1def060, 
  silent = 0 '\000', 
  display_canonical = 0 '\000', 
  ignore_count = 0, 
  enable_count = 0, 
  commands = 0x0, 
  frame_id = {
    stack_addr = 140737488344328, 
    code_addr = 140737488344335, 
    special_addr = 0, 
    stack_status = FID_STACK_VALID, 
    code_addr_p = 1, 
    special_addr_p = 0, 
    artificial_depth = 0
  }, 
  pspace = 0x10a8680, 
  location = 0x0, 
  filter = 0x0, 
  location_range_end = 0x0, 
  gdbarch = 0x181ed10, 
  language = language_c, 
  input_radix = 10, 
  cond_string = 0x0, 
  extra_string = 0x0, 
  related_breakpoint = 0x1def1f0, 
  thread = 1, 
  task = 0, 
  hit_count = 0, 
  condition_not_parsed = 0, 
  py_bp_object = 0x0, 
  scm_bp_object = 0x0
}
(top-gdb)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]