Commit Graph

122 Commits

Author SHA1 Message Date
nickysn
011e8fcd07 * moved the code for setting max width and then restoring it when obtaining a
backtrace from fpdebug.pas to the Backtrace method in the libgdb.a interface.
- removed the code for changing the gdb window width from fpdebug.pas entirely,
  because it makes no sense for the gdb/mi interface and it's better to use
  MaxWidth/NormWidth in the libgdb.a interface for the libgdb.a functions that
  need it.

git-svn-id: trunk@30299 -
2015-03-24 00:27:44 +00:00
nickysn
aff3fb62ae - rm code that parses the response when retrieving the value of a watchpoint
variable, since that's now done in PrintCommand for the libgdb.a interface
  (and is not necessary for the gdb/mi interface)

git-svn-id: trunk@30162 -
2015-03-11 00:59:53 +00:00
nickysn
7b6e649714 * simplified the GetValue nested procedure inside TWatch.Get_new_value
git-svn-id: trunk@30119 -
2015-03-07 14:44:59 +00:00
nickysn
e52238df42 - rm code for parsing and extracting the value of the print command result, when
retrieving FrameName, since that's already done in TGDBController.PrintCommand
  for the libgdb.a interface (and unnecessary for the gdb/mi interface)

git-svn-id: trunk@30118 -
2015-03-07 14:26:10 +00:00
nickysn
a32b335832 * use sizeof(CORE_ADDR) instead of sizeof(pointer) for finding the parameters
on the stack in GetFPCBreakParameters

git-svn-id: trunk@30117 -
2015-03-07 01:15:16 +00:00
pierre
3af4a43834 Use sizeof(CORE_ADDR)*2 in hexstr call inside GetLongintAt and GetPointerAt methods
git-svn-id: trunk@30090 -
2015-03-03 21:54:43 +00:00
pierre
1c5be35315 fpdebug.pas:
+ Add code to handle GDBRawBuf if GDB_RAW_OUTPUT macro is defined.
  + Use SelectFrameCommand method instead of Command('f '+...
  + Remove /x modifer from getValue for FreamNameKnown code inside TWatch.Get_new_value;

fpviews.pas:
  + Also use correct address size in AddDisassemblyLine
  * Replace 'set sym on' by 'set symbol on' to avoid mi error
  * Use /m modifier for disassembly to get also source code lines
  + Recognize '=> ' current pc indicator inside TDisassemblyWindow.ProcessPChar

git-svn-id: trunk@30089 -
2015-03-03 21:44:07 +00:00
nickysn
249be70290 * show 64-bit addresses as 64-bit in the stack trace
git-svn-id: trunk@30073 -
2015-03-02 15:49:54 +00:00
nickysn
7acc709ac0 * prepend the watch value with '= ' to keep the old way the IDE watches looked
like (the '= ' used to come from the gdb output and was intentionally kept by
  the response parsing code, which is now removed)

git-svn-id: trunk@30059 -
2015-03-02 00:50:45 +00:00
nickysn
08ed7778db - removed the response parsing code for extracting the watch value from
TWatch.Get_new_value as that is now done in PrintCommand for the libgdb.a
  interface (and is unnecessary for the gdb/mi interface, where we get the value
  only, without anything else)

git-svn-id: trunk@30058 -
2015-03-02 00:47:08 +00:00
nickysn
9d1c9a2a6a * fixed watches under gdb/mi after r30043
git-svn-id: trunk@30055 -
2015-03-01 23:44:11 +00:00
nickysn
67a66f104d * converted the result of TGDBController.PrintCommand from pchar to ansistring:
* supports returning long strings
  * can be easily converted to a pchar without truncation (a simple PChar(x)
    works for read-only access or a full copy via StrNew(PChar(x)) )
  * can be easily converted to shortstring without memleaks (shortstr := pchar
    works, but creates a silent memleak, when the pchar returned should be
    StrDispose'd)

git-svn-id: trunk@30052 -
2015-03-01 22:57:48 +00:00
pierre
caa77e1f8d Add TGDBController.SetCommand method and use it
git-svn-id: trunk@30046 -
2015-03-01 17:00:16 +00:00
pierre
36086cc183 ide/gdbmiint.pas: Add init_count field,
New Set_debuggee_started method to update init_count properly.

  ide/gdbmicon.ppas and packages/gdbint/src/gdbcon.pp:
  Add PrintCommand and PrintFormattedCommand methods to
  allow using of mi command for fpdebug unit TDebugController.GetValue method

  packages/gdbint/src/gdbcon.pp:
  Add InternalGetValue method, that uses previous code from fpdebug GetValue method

git-svn-id: trunk@30043 -
2015-03-01 13:21:26 +00:00
nickysn
c62f3ec271 * handle failure in GetFPCBreakErrorParameters and continue execution silently
in a gdb/mi safe way

git-svn-id: trunk@30020 -
2015-02-27 00:34:16 +00:00
nickysn
47509b0148 + added parameter BreakIndex (containing the breakpoint index if we stopped on a
breakpoint, or zero otherwise) to DoSelectSourceLine, instead of using
  stop_breakpoint_number
- removed stop_breakpoint_number and all the convoluted logic around it from the
  gdb/mi interface
* made stop_breakpoint_number private in the libgdb.a interface to ensure it's
  only used for internal use; UI code should rely on the new BreakIndex
  parameter instead

git-svn-id: trunk@30003 -
2015-02-25 01:48:23 +00:00
pierre
eeda87007e + Handle failure of LoadFile method inside TDebugController.SetExe
+ interrupt frame up loop of GetValue fails inside TWatch.Get_new_value method

git-svn-id: trunk@29991 -
2015-02-24 16:19:29 +00:00
nickysn
3b55dd919d * fixed getting the FPC_BREAK_ERROR parameters on i386
git-svn-id: trunk@29803 -
2015-02-23 00:06:09 +00:00
nickysn
ac79722eb2 * use the Backtrace method (which supports gdb/mi) instead of issuing the
command directly in TDebugController.DoSelectSourceLine

git-svn-id: trunk@29802 -
2015-02-22 23:53:54 +00:00
nickysn
4a1a443ffa * fixed getting the FPC_BREAK_ERROR parameters on x86_64
git-svn-id: trunk@29801 -
2015-02-22 23:47:42 +00:00
nickysn
5ec640006c * moved the code that obtains the parameters to HandleErrorAddrFrame (after
trapping a runtime error) to a separate method.

git-svn-id: trunk@29798 -
2015-02-22 22:30:36 +00:00
nickysn
8ed6109955 * setting breakpoint ignore count implemented via gdb/mi command in the gdb/mi
interface

git-svn-id: trunk@29790 -
2015-02-22 02:46:48 +00:00
nickysn
46695f37b4 * use the gdb/mi command for setting breakpoint conditions in the gdb/mi interface
git-svn-id: trunk@29789 -
2015-02-22 02:20:28 +00:00
nickysn
1bfcf14ef9 * use gdb/mi commands to enable/disable breakpoints in the gdb/mi interface
git-svn-id: trunk@29788 -
2015-02-22 01:51:59 +00:00
nickysn
c2d659950e * use the gdb/mi command for deleting breakpoints
git-svn-id: trunk@29787 -
2015-02-22 01:29:27 +00:00
nickysn
a1afce8a69 * fixed crash with the gdb/mi debugger, when trying to step/run a program with
the gdb window open

git-svn-id: trunk@29782 -
2015-02-21 23:37:24 +00:00
nickysn
a445b4730b + added breakpoint flags parameter to TGDBController.BreakpointInsert. The
supported flags are 'temporary' and 'hardware' breakpoint.

git-svn-id: trunk@29763 -
2015-02-19 22:04:31 +00:00
nickysn
df234bd7fe + added method WatchpointInsert to TGDBController, with a gdb/mi implementation
* all breakpoint and watchpoint adding now go through TGDBController and use
  the proper gdb/mi commands when compiled with the gdb/mi debugger

git-svn-id: trunk@29746 -
2015-02-17 22:49:31 +00:00
nickysn
4f8b8da879 + added method BreakpointInsert to gdbcon, which supports the gdb/mi command for
adding breakpoints.
* use the new method for adding the breakpoint to FPC_BREAK_ERROR

git-svn-id: trunk@29744 -
2015-02-17 21:17:02 +00:00
nickysn
a47a810475 + implemented gdb/mi backtraces
git-svn-id: trunk@29736 -
2015-02-17 00:59:39 +00:00
nickysn
dc54903e01 * use gdb/mi command for setting tty
git-svn-id: trunk@29734 -
2015-02-16 22:11:25 +00:00
nickysn
9eeef2581b * use a gdb/mi command for adding source directories
git-svn-id: trunk@29732 -
2015-02-16 21:41:06 +00:00
pierre
d0cfebc351 + Use using_cygwin_gdb boolean, to convert path
git-svn-id: trunk@29730 -
2015-02-16 20:50:47 +00:00
nickysn
3deac03582 * use a gdb/mi command when clearing the exe in TDebugController.SetExe
git-svn-id: trunk@29722 -
2015-02-16 20:16:08 +00:00
nickysn
f06731ae4f * TDebugController.SetTBreak (adds a temporary breakpoint, used for things like
'run to cursor') moved to gdbcon.pp and implemented via a GDB/MI command in
  the new GDB/MI interface.

git-svn-id: trunk@29721 -
2015-02-16 19:58:40 +00:00
nickysn
8f9c062e4d * fixed Run->"Until return" in the GDB/MI debugger
git-svn-id: trunk@29717 -
2015-02-16 02:25:53 +00:00
nickysn
a939ea06b6 + initial implementation of GDB/MI (without LibGDB!) support for the text mode
IDE. Tested under Linux (Fedora 21 - x86_64, GDB 7.8.2). It is still disabled
  by default on all platforms. To enable it, build a snapshot with:
  FPMAKEOPT="--ignoreinvalidoption --GDBMI=1"
  Known issue: the GDB window in the IDE causes crashes, so don't open it :)
  (for debugging purposes, set the environment variable FPIDE_GDBLOG=1 when
  running the IDE and it will log everything in gdblog.txt)

git-svn-id: trunk@29716 -
2015-02-16 01:07:37 +00:00
pierre
c5601c5094 Use 'set gnutarget elf32-littlearm' for arm cross
git-svn-id: trunk@28939 -
2014-10-27 22:12:13 +00:00
pierre
e73341550b SUPPORT_REMOTE improvement
git-svn-id: trunk@28920 -
2014-10-24 21:54:37 +00:00
pierre
9720bd8e82 Merge forgotten go32v2 2.6.0 branch changes back into trunk.
------------------------------------------------------------------------
r20575 | pierre | 2012-03-22 16:27:57 +0100 (Thu, 22 Mar 2012) | 1 line

 Avoid 'Discard file' question inside reset
------------------------------------------------------------------------
r20581 | pierre | 2012-03-22 18:21:34 +0100 (Thu, 22 Mar 2012) | 1 line

 * Disable iocheck when closing gdb_file
------------------------------------------------------------------------

git-svn-id: trunk@24227 -
2013-04-12 10:19:38 +00:00
pierre
1b4a27ed66 Avoid interactive query when resetting file
git-svn-id: trunk@19876 -
2011-12-19 13:03:25 +00:00
pierre
14a10ad6cb + Add $rbp FrameName for x86_64 CPU
git-svn-id: trunk@16662 -
2010-12-30 14:53:57 +00:00
marco
de5ca33983 * fix one of two issues in mantis 6326, double click on watch entry invokes edit watch
git-svn-id: trunk@16604 -
2010-12-21 08:15:31 +00:00
pierre
18bd6a344d + SetTBreak method added
git-svn-id: trunk@15890 -
2010-08-24 13:35:09 +00:00
pierre
583ce9c1b9 * more GDB 7.0 changes
git-svn-id: trunk@14047 -
2009-11-04 14:21:32 +00:00
marco
10c67a4ad5 * fields after objects methods.
git-svn-id: trunk@13340 -
2009-06-27 14:06:58 +00:00
marco
0518f65f63 * fixed typo
git-svn-id: trunk@11929 -
2008-10-18 18:29:32 +00:00
marco
87eaa3c12b * put expansion of pathname for debugging purposes under ifdef to ease mingw use.
git-svn-id: trunk@11928 -
2008-10-18 18:28:56 +00:00
giulio
157b00a44a IDE: Cleaned ifdefs related to Turbo Pascal and FPC 1.x
git-svn-id: trunk@11423 -
2008-07-20 21:37:48 +00:00
florian
63a73870cf * check if breakpoint name is assigned when displaying breakpoints in the disassembly window, resolves #9257
git-svn-id: trunk@8857 -
2007-10-19 22:34:31 +00:00