public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* problem debugging assembler functions
@ 2005-06-14  9:23 Vladimir Prus
  2005-06-14 14:37 ` Daniel Jacobowitz
  0 siblings, 1 reply; 10+ messages in thread
From: Vladimir Prus @ 2005-06-14  9:23 UTC (permalink / raw)
  To: gdb


Hello,
I'm trying to port gdb to a new architecture (with it's own compiler), and
run into problems with assembler functions. I can successfully step into
an assembler function, but when I run "step", instead of moving to the 
next instruction, gdb sets breakpoint at return address and continues.
Looking at the code, I see this (in infrun.c)

Line 2285:

 if (frame_id_eq (frame_unwind_id (get_current_frame ()), step_frame_id))
 {
     ......
 }

Line 2428:

 if (step_over_calls == STEP_OVER_UNDEBUGGABLE
      && ecs->stop_func_name == NULL)
  {
       /* The inferior just stepped into, or returned to, an
         undebuggable function (where there is no symbol, not even a
         minimal symbol, corresponding to the address where the
         inferior stopped). 
        */

        ........

        insert_step_resume_breakpoint_at_frame (
             get_prev_frame (get_current_frame ()));  
  }


The condition is the second code block is taken and breakpoint is indeed
set. I have two questions:

1. Is "just stepped into ... function" comment accurate? I think that all
cases of steppin into function are handled by the previous

 if (frame_id_eq (frame_unwind_id (get_current_frame ()), step_frame_id)) {}

condition, and all code paths inside that condition end with return. So, the
second code block is not executed when we've just stepped into a function.
Is the code intended to handle only the case when we've *returned* to
undebuggable function?

2. In my case, no function names for assembler modules are present in debug
info, but line information is there, so the function is debuggable. Is
there a way to check of line info in condition, not for function name?

Thanks in advance,
Volodya


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2005-07-14 14:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-14  9:23 problem debugging assembler functions Vladimir Prus
2005-06-14 14:37 ` Daniel Jacobowitz
2005-06-14 14:54   ` Vladimir Prus
2005-06-14 14:58     ` Daniel Jacobowitz
2005-06-14 15:19       ` Vladimir Prus
2005-06-14 15:27         ` Daniel Jacobowitz
2005-07-14  8:54           ` Vladimir Prus
2005-07-14 14:11             ` Daniel Jacobowitz
2005-07-14 14:08               ` Vladimir Prus
2005-07-14 14:11                 ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).