This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Support assembler modules with line info only
- From: Daniel Jacobowitz <drow at false dot org>
- To: Vladimir Prus <ghost at cs dot msu dot su>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sun, 31 Jul 2005 23:33:10 -0400
- Subject: Re: Support assembler modules with line info only
- References: <200507141816.46035.ghost@cs.msu.su>
On Thu, Jul 14, 2005 at 06:16:45PM +0400, Vladimir Prus wrote:
>
> The attached patch allows gdb to debug assembler modules that have only
> line number information, and nothing else (including function names).
>
>
> Changerlog entry:
> 2005-07-14 Vladimur Prus <ghost@cs.msu.su>
>
> gdb/infrun.c (handle_inferior_event): When deciding if we've entered
> undebuggable function, check for ecs->sal.line != 0, not for
> ecs->stop_func_name != NULL.
I suppose this is reasonable. Here's what I've tested on
i686-pc-linux-gnu, and committed. Please let me know if the extra test
breaks it for you.
--
Daniel Jacobowitz
CodeSourcery, LLC
2005-07-31 Daniel Jacobowitz <dan@codesourcery.com>
Suggested by Vladimir Prus <ghost@cs.msu.su>:
* infrun.c (handle_inferior_event): Check for line information in
undebuggable functions.
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.202
diff -u -p -r1.202 infrun.c
--- infrun.c 29 May 2005 03:13:17 -0000 1.202
+++ infrun.c 1 Aug 2005 03:30:45 -0000
@@ -2485,18 +2485,21 @@ process_event_stop_test:
}
}
+ ecs->sal = find_pc_line (stop_pc, 0);
+
/* NOTE: tausq/2004-05-24: This if block used to be done before all
the trampoline processing logic, however, there are some trampolines
that have no names, so we should do trampoline handling first. */
if (step_over_calls == STEP_OVER_UNDEBUGGABLE
- && ecs->stop_func_name == NULL)
+ && ecs->stop_func_name == NULL
+ && ecs->sal.line == 0)
{
if (debug_infrun)
fprintf_unfiltered (gdb_stdlog, "infrun: stepped into undebuggable function\n");
/* 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
+ undebuggable function (where there is no debugging information
+ and no line number corresponding to the address where the
inferior stopped). Since we want to skip this kind of code,
we keep going until the inferior returns from this
function. */
@@ -2532,8 +2535,6 @@ process_event_stop_test:
return;
}
- ecs->sal = find_pc_line (stop_pc, 0);
-
if (ecs->sal.line == 0)
{
/* We have no line number information. That means to stop