View Issue Details

IDProjectCategoryView StatusLast Update
0023853LazarusDebuggerpublic2013-02-08 04:24
ReporterMartin FriebeAssigned ToMartin Friebe 
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
Product VersionProduct Build 
Target VersionFixed in Version 
Summary0023853: GDB fails on exception message/location if char/pointer is not known
Descriptionsee issue 0023321
Steps To Reproduce  >> TCmdLineDebugger.SendCmdLn "-gdb-version"
  << TCmdLineDebugger.ReadLn "~"GNU gdb (GDB) 7.4.1-debian\n""
  << TCmdLineDebugger.ReadLn "~"Copyright (C) 2012 Free Software Foundation, Inc.\n""
  << TCmdLineDebugger.ReadLn "~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\n""
  << TCmdLineDebugger.ReadLn "~"This GDB was configured as \"x86_64-linux-gnu\".\nFor bug reporting instructions, please see:\n""




  << TCmdLineDebugger.ReadLn "*stopped,reason="breakpoint-hit",disp="keep",bkptno="5",frame={addr="0x0000000000411578",func="fpc_raiseexception",args=[]},thread-id="1",stopped-threads="all",core="0""
  << TCmdLineDebugger.ReadLn "(gdb) "
  >> TCmdLineDebugger.SendCmdLn "-data-evaluate-expression ^^char(^^char($rdi)^+24)^"
  << TCmdLineDebugger.ReadLn "^error,msg="A syntax error in expression, near `char(^^char($rdi)^+24)^'.""
  << TCmdLineDebugger.ReadLn "(gdb) "
  >> TCmdLineDebugger.SendCmdLn "-data-evaluate-expression ^char(^pointer(^^char(^^char($rdi)^+24)^+24)^)"
  << TCmdLineDebugger.ReadLn "^error,msg="A syntax error in expression, near `char(^pointer(^^char(^^char($rdi)^+24)^+24)^)'.""
  << TCmdLineDebugger.ReadLn "(gdb) "
  >> TCmdLineDebugger.SendCmdLn "x/s ^^char(^^char($rdi)+1)^"
  << TCmdLineDebugger.ReadLn "&"x/s ^^char(^^char($rdi)+1)^\n""
  << TCmdLineDebugger.ReadLn "&"A syntax error in expression, near `char(^^char($rdi)+1)^'.\n""
  << TCmdLineDebugger.ReadLn "^error,msg="A syntax error in expression, near `char(^^char($rdi)+1)^'.""
  << TCmdLineDebugger.ReadLn "(gdb) "
  >> TCmdLineDebugger.SendCmdLn "-data-evaluate-expression $rsi"
  << TCmdLineDebugger.ReadLn "^done,value="4194767""
  << TCmdLineDebugger.ReadLn "(gdb) "
  >> TCmdLineDebugger.SendCmdLn "-data-evaluate-expression $rdx"
  << TCmdLineDebugger.ReadLn "^done,value="0""
  << TCmdLineDebugger.ReadLn "(gdb) "
  >> TCmdLineDebugger.SendCmdLn "info line * POINTER(4194767)"
  << TCmdLineDebugger.ReadLn "&"info line * POINTER(4194767)\n""
  << TCmdLineDebugger.ReadLn "&"No symbol \"POINTER\" in current context.\n""
  << TCmdLineDebugger.ReadLn "^error,msg="No symbol \"POINTER\" in current context.""
  << TCmdLineDebugger.ReadLn "(gdb) "
TagsNo tags attached.
Fixed in Revision
LazTarget-
Widgetset
Attached Files

Activities

Benito van der Zander

2013-02-08 02:39

reporter   ~0065564

Ok, if I add

type char = system.char;

it (exception kind and message) works...

If I add

type char = integer;

it does not work.


If I add

type char = string

or

type char = Tlist;

it does work.;

Martin Friebe

2013-02-08 03:12

manager   ~0065567

Yes char needs to the correct type.

The IDE has several ways of finding the info. It looks also if the class Exception is defined.

Both the class Exception, and the code for handling it are in the rtl. And except for the address of the except program, there is no type info.

Ultimately I need to add a fallback, and make gdb just dump areas of memory.
In most apps the current set of tricks is sufficient.

Martin Friebe

2013-02-08 04:24

manager   ~0065568

I removed the "pointer" dependency in rev 40205.

This is actually only a fallback. From the log I saw -O3 on the fpc command-line. Without that I would expect that this would not have been triggered.

Issue History

Date Modified Username Field Change
2013-02-08 02:03 Martin Friebe New Issue
2013-02-08 02:03 Martin Friebe Status new => assigned
2013-02-08 02:03 Martin Friebe Assigned To => Martin Friebe
2013-02-08 02:39 Benito van der Zander Note Added: 0065564
2013-02-08 03:12 Martin Friebe Note Added: 0065567
2013-02-08 04:24 Martin Friebe Note Added: 0065568