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 gdb/17384] android arm gdb "Cannot access memory at address" when I "stepi" over "blx"


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

--- Comment #11 from Pedro Alves <palves at redhat dot com> ---
> Also, regarding safe_read_memory_integer() printing errors I should say that 
> there is more to that part of the bug than just the fact that the error is 
> printed. This is because after I type "next" and get the error, I cannot just 
> run "next" again; at that point gdb just constantly prints "Cannot find bounds 
> of current function" and refuses to move forward; like this:

Yeah, GDB isn't very clear here.  GDB is looking for the bounds of the function
in order to do the:

          printf_filtered (_("Single stepping until exit from function %s,"
                 "\nwhich has no line number information.\n"),
                   name);

bit, which you've probably seen trigger before.

If you do "set step-mode on", GDB will fall back to "stepi" instead of erroring
out.

      /* If we have no line info, switch to stepi mode.  */
      if (tp->control.step_range_end == 0 && step_stop_if_no_debug)
        {
          tp->control.step_range_start = tp->control.step_range_end = 1;
          tp->control.may_range_step = 0;
        }
      else if (tp->control.step_range_end == 0)
        {
          const char *name;

          if (find_pc_partial_function (pc, &name,
                        &tp->control.step_range_start,
                        &tp->control.step_range_end) == 0)
        error (_("Cannot find bounds of current function"));

          target_terminal_ours ();
          printf_filtered (_("Single stepping until exit from function %s,"
                 "\nwhich has no line number information.\n"),
                   name);
        }

IMO, instead of "error", when we can't find the founds of the function, GDB
should instead switch to stepi mode.  I think there's a specific bug open about
this.

-- 
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]