View Issue Details

IDProjectCategoryView StatusLast Update
0016318LazarusDebuggerpublic2011-12-01 11:24
ReporterMartin FriebeAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.29 (SVN)Product Build 
Target Version0.9.30Fixed in Version0.9.29 (SVN) 
Summary0016318: Arithmetic overflow except in debugger disassembler
DescriptionYou need to run Lazarus as debugged application (and then start another debugging session, inside the debugged Lazarus)

Set a breakpoint on SourceEditor.SetExecutionLine.
Get the debugged lazarus to stop at this line
Open assembler window
=> boom
Additional Informationthe last bits from the debug output:

=thread-exited,id="2",group-id="4992"
~"[Switching to Thread 4992.0x1608]\n"
*stopped,reason="breakpoint-hit",disp="keep",bkptno="6",frame={addr="0x00956a3f",func="SETEXECUTIONLINE",args=[{name="this",value="0xb3ebab8"},{name="NEWLINE",value="-1"}],file="sourceeditor.pp",fullname="C:/lazarus_latest/ide/sourceeditor.pp",line="3573"},thread-id="1",stopped-threads="all"
=thread-selected,id="1"
(gdb)
<-data-disassemble -s 9792063 -e 9792094 -- 1>
^done,asm_insns=[src_and_asm_line={line="3573",file="sourceeditor.pp",line_asm_insn=[{address="0x00956a3f",func-name="SETEXECUTIONLINE",offset="15",inst="mov
-0x8(%ebp),%eax"},{address="0x00956a42",func-name="SETEXECUTIONLINE",offset="18",inst="call
0x959280
<GETEXECUTIONLINE>"},{address="0x00956a47",func-name="SETEXECUTIONLINE",offset="23",inst="mov
-0x4(%ebp),%edx"},{address="0x00956a4a",func-name="SETEXECUTIONLINE",offset="26",inst="cmp
%edx,%eax"},{address="0x00956a4c",func-name="SETEXECUTIONLINE",offset="28",inst="je
0x956ab8
<SETEXECUTIONLINE+136>"}]},src_and_asm_line={line="3574",file="sourceeditor.pp",line_asm_insn=[{address="0x00956a4e",func-name="SETEXECUTIONLINE",offset="30",inst="mov
-0x8(%ebp),%eax"},{address="0x00956a51",func-name="SETEXECUTIONLINE",offset="33",inst="mov
0xc(%eax),%eax"},{address="0x00956a54",func-name="SETEXECUTIONLINE",offset="36",inst="mov
0x8(%eax),%eax"},{address="0x00956a57",func-name="SETEXECUTIONLINE",offset="39",inst="test
%eax,%eax"},{address="0x00956a59",func-name="SETEXECUTIONLINE",offset="41",inst="jne
0x956a70
<SETEXECUTIONLINE+64>"}]},src_and_asm_line={line="3575",file="sourceeditor.pp",line_asm_insn=[{address="0x00956a5b",func-name="SETEXECUTIONLINE",offset="43",inst="mov
-0x4(%ebp),%eax"},{address="0x00956a5e",func-name="SETEXECUTIONLINE",offset="46",inst="cmp
$0xffffffff,%eax"},{address="0x00956a61",func-name="SETEXECUTIONLINE",offset="49",inst="je
0x956ab8 <SETEXECUTIONLINE+136>"}]}]
(gdb)

TApplication.HandleException Arithmetic overflow
   Stack trace:
   $00BB524C line 1539 of ../debugger/gdbmidebugger.pp
   $004A72AE line 286 of ../objpas/classes/lists.inc
   $004A7343 line 306 of ../objpas/classes/lists.inc
   $004A8068 line 714 of ../objpas/classes/lists.inc
   $00BBF82B line 4003 of ../debugger/gdbmidebugger.pp
   $00925006 line 1818 of ../debugger/debugger.pp
   $009243C8 line 1639 of ../debugger/debugger.pp
   $00BAE244 line 546 of ../debugger/assemblerdlg.pp
   $00BAD155 line 309 of ../debugger/assemblerdlg.pp
   $0091EE96 line 1679 of debugmanager.pas
   $0092449C line 1651 of ../debugger/debugger.pp
   $00BBD846 line 3505 of ../debugger/gdbmidebugger.pp
   $00BBE95A line 3955 of ../debugger/gdbmidebugger.pp
   $00BB4790 line 1378 of ../debugger/gdbmidebugger.pp
   $00BB4185 line 1274 of ../debugger/gdbmidebugger.pp
   $00BC0223 line 4391 of ../debugger/gdbmidebugger.pp
   $00BBAC63 line 2847 of ../debugger/gdbmidebugger.pp


TagsNo tags attached.
Fixed in Revision27569
LazTarget0.9.30
WidgetsetWin32/Win64
Attached Files

Relationships

duplicate of 0017537 closedMartin Friebe Debugger: added a typecast to prevent a range check error 

Activities

Martin Friebe

2010-10-03 23:04

manager   ~0041460

Fixed through related report 0017537
please test and close if ok

Martin Friebe

2010-10-04 13:24

manager   ~0041476

Changed last fix:
comparing (virtual?) addresses with highest bit set would lead to wrong order.

$8000 0000 0000 0000 would be typecast to negative number and appear smaller than $7fff 0000 0000 0000.

Issue History

Date Modified Username Field Change
2010-04-23 00:20 Martin Friebe New Issue
2010-04-23 00:20 Martin Friebe LazTarget => -
2010-04-23 00:20 Martin Friebe Widgetset => Win32/Win64
2010-06-26 17:15 Marc Weustink Assigned To => Marc Weustink
2010-06-26 17:15 Marc Weustink Status new => assigned
2010-06-26 17:15 Marc Weustink Category IDE => Debugger
2010-10-03 22:32 Martin Friebe Relationship added duplicate of 0017537
2010-10-03 22:50 Martin Friebe Assigned To Marc Weustink => Martin Friebe
2010-10-03 23:04 Martin Friebe Fixed in Revision => 27554
2010-10-03 23:04 Martin Friebe LazTarget - => 0.9.30
2010-10-03 23:04 Martin Friebe Status assigned => resolved
2010-10-03 23:04 Martin Friebe Fixed in Version => 0.9.29 (SVN)
2010-10-03 23:04 Martin Friebe Resolution open => fixed
2010-10-03 23:04 Martin Friebe Note Added: 0041460
2010-10-03 23:04 Martin Friebe Target Version => 0.9.30
2010-10-04 13:24 Martin Friebe Fixed in Revision 27554 => 27569
2010-10-04 13:24 Martin Friebe Note Added: 0041476
2011-12-01 11:24 Marc Weustink Status resolved => closed