winedbg: Extract address from expression for listing source at address.

Dylan Smith dylan.ah.smith at gmail.com
Sat Aug 22 22:15:21 CDT 2009


This patch will only apply cleanly after applying my previous patch:
winedbg: Fixed listing source of function in file.

Previously the address that was used to find the line number was the
address of the expression value.  This patch extracts that value from
the expression so the correct address is used to get the line number for
the list command.
---
 programs/winedbg/dbg.y |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
-------------- next part --------------
diff --git a/programs/winedbg/dbg.y b/programs/winedbg/dbg.y
index c1dcfd1..9b28fd1 100644
--- a/programs/winedbg/dbg.y
+++ b/programs/winedbg/dbg.y
@@ -182,8 +182,9 @@ list_arg:
     | pathname ':' tNUM	        { $$.FileName = $1; $$.LineNumber = $3; }
     | identifier	        { symbol_get_line(NULL, $1, &$$); }
     | pathname ':' identifier   { symbol_get_line($1, $3, &$$); }
-    | '*' expr_lvalue	        { DWORD disp; $$.SizeOfStruct = sizeof($$);
-                                  SymGetLineFromAddr(dbg_curr_process->handle, (unsigned long)memory_to_linear_addr(& $2.addr), &disp, & $$); }
+    | '*' expr_lvalue	        { DWORD disp; ADDRESS64 addr; $$.SizeOfStruct = sizeof($$);
+                                  types_extract_as_address(&$2, &addr);
+                                  SymGetLineFromAddr(dbg_curr_process->handle, (unsigned long)memory_to_linear_addr(& addr), &disp, & $$); }
     ;
 
 run_command:


More information about the wine-patches mailing list