running a 16 bit application from bug Bug 5493
now gives an a continuous list of
fixme:dbghelp_dwarf:dwarf2_compute_location Unhandled attr op: 75
instead of continuous page faulting between on the lookup.
What traces do you need and I will add them to that bug.
does the attached patch help ?
A+
------------------------------------------------------------------------
From nobody Mon Sep 17 00:00:00 2001
From:
Eric Pouech <eric.pouech(a)wanadoo.fr>
Date: Sat, 1 Jul 2006 11:38:10 +0200
Subject: [PATCH] [DbgHelp]: dwarf & variable with const values
- properly handle variable with const value (ie without
location) in dwarf code
---
dlls/dbghelp/dwarf.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
5d683a5bfdb679fe617ced7b9070756c29d45a85
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index 01250a5..a618986 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -1050,20 +1050,20 @@ static void dwarf2_parse_variable(dwarf2
dwarf2_debug_info_t* di)
{
struct symt* param_type;
- union attribute loc;
+ union attribute name, loc, value;
BOOL is_pmt = di->abbrev->tag == DW_TAG_formal_parameter;
TRACE("%s, for %s\n", dwarf2_debug_ctx(subpgm->ctx),
dwarf2_debug_di(di));
param_type = dwarf2_lookup_type(subpgm->ctx, di);
- if (dwarf2_find_attribute(di, DW_AT_location, &loc))
+ dwarf2_find_name(subpgm->ctx, di, &name, "parameter");
+ if (dwarf2_find_attribute(di, DW_AT_location, &loc) && loc.block)
{
union attribute name;
union attribute ext;
long offset;
int in_reg;
- dwarf2_find_name(subpgm->ctx, di, &name, "parameter");
offset = dwarf2_compute_location(subpgm->ctx, loc.block, &in_reg);
TRACE("found parameter %s/%ld (reg=%d) at %s\n",
name.string, offset, in_reg, dwarf2_debug_ctx(subpgm->ctx));
@@ -1094,6 +1094,10 @@ static void dwarf2_parse_variable(dwarf2
break;
}
}
+ if (dwarf2_find_attribute(di, DW_AT_const_value, &value))
+ {
+ FIXME("NIY (const value %08lx for %s\n", value.uvalue, name.string);
+ }
if (is_pmt && subpgm->func && subpgm->func->type)
symt_add_function_signature_parameter(subpgm->ctx->module,
(struct
symt_function_signature*)subpgm->func->type,
This app is downloadable and takes only a few steps to reproduce.
Recompiled with that patch using the CFLAGS="$CFLAGS -gdwarf-2" ./configure
and this it the console output
wine: Unhandled page fault on read access to 0x00001d88 at address
0x18e7:0x000018d2 (thread 0010), starting debugger...
WineDbg starting on pid 0xa
Unhandled exception: page fault on read access to 0x00001d88 in 16-bit
code (18e7:18d2).
fixme:dbghelp:addr_to_linear Failed to linearize address 101a:00009f0d
(mode 0)
In 16 bit mode.
Register dump:
CS:18e7 SS:1b37 DS:191f ES:1a6f FS:003b GS:0033
IP:18d2 SP:540e BP:5416 FLAGS:0206( - 00 - RIP1)
AX:500e BX:5422 CX:0000 DX:0000 SI:0000 DI:1c10
Stack dump:
0x1b37:0x540e: 1c10 0000 18e7 1b37 5485 153b 1a9f 0000
0x1b37:0x541e: 0032 0000 5436 0944 18e7 1270 1ba7 0008
0x1b37:0x542e: 1d5c 0000 0032 1b37 5441 1481 1ab7 0008
0323: sel=191f base=7fe30818 limit=00002d9f 16-bit rw-
034d: sel=1a6f base=7deac750 limit=00001fff 16-bit rw-
fixme:ntdll:RtlNtStatusToDosErrorNoTeb no mapping for c0000119
Backtrace:
=>1 0x18e7:0x18d2 (0x18e7:0x18d2)
2 0x1a9f:0x153b (0x1a9f:0x153b)
3 0x101a:0x9f0d (0x101a:0x9f0d)
4 0x1aef:0x1cdf (0x1aef:0x1cdf)
5 0x1aef:0x1b9e (0x1aef:0x1b9e)
6 0x1b17:0x1447 (0x1b17:0x1447)
fixme:dbghelp:elf_load_debug_info_from_map Alpha-support for Dwarf2
information for kernel32<elf>
fixme:dbghelp_dwarf:dwarf2_compute_location Unhandled attr op: 75
wine: Unhandled page fault on read access to 0x55ac7760 at address
0x7faba0f8 (thread 0012), starting debugger...
WineDbg starting on pid 0x11
Unhandled exception: page fault on read access to 0x55ac7760 in 32-bit
code (0x7faba0f8).
fixme:dbghelp:elf_load_debug_info_from_map Alpha-support for Dwarf2
information for dbghelp<elf>
fixme:dbghelp_dwarf:dwarf2_compute_location Unhandled attr op: 75
wine: Unhandled page fault on read access to 0x55ac7760 at address
0x7faba0f8 (thread 0014), starting debugger...
WineDbg starting on pid 0x13
Unhandled exception: page fault on read access to 0x55ac7760 in 32-bit
code (0x7faba0f8).
fixme:dbghelp:elf_load_debug_info_from_map Alpha-support for Dwarf2
information for dbghelp<elf>
fixme:dbghelp_dwarf:dwarf2_compute_location Unhandled attr op: 75
wine: Unhandled page fault on read access to 0x55ac7760 at address
0x7faba0f8 (thread 0016), starting debugger...
WineDbg starting on pid 0x15
Unhandled exception: page fault on read access to 0x55ac7760 in 32-bit
code (0x7faba0f8).
fixme:dbghelp:elf_load_debug_info_from_map Alpha-support for Dwarf2
information for dbghelp<elf>
fixme:dbghelp_dwarf:dwarf2_compute_location Unhandled attr op: 75
wine: Unhandled page fault on read access to 0x55ac7760 at address
0x7faba0f8 (thread 0018), starting debugger...
WineDbg starting on pid 0x17
Unhandled exception: page fault on read access to 0x55ac7760 in 32-bit
code (0x7faba0f8).
....
continues until ctrl C