Commit Graph

32 Commits

Author SHA1 Message Date
nickysn
3250a91995 * use hex when retrieving registers via gdb/mi. This stops gdb from returning
negative numbers.

git-svn-id: trunk@30114 -
2015-03-06 21:12:43 +00:00
nickysn
52d13e6ddb + added 16-bit int overloads for TGDBController.GetIntRegister. Useful for
e.g. getting the segment registers on x86.

git-svn-id: trunk@30113 -
2015-03-06 21:10:57 +00:00
pierre
93ca6267c8 Add function parameters with values in Call Stack window
git-svn-id: trunk@30091 -
2015-03-03 22:24:20 +00:00
pierre
a0c6d55d10 Reset GDBRawBuf at same time as GDBOutputBuf and avoid error on -environment-cd if string is empty
git-svn-id: trunk@30088 -
2015-03-03 21:32:30 +00:00
nickysn
1e842ffb6f * TGDBMI_Value.AsPtrInt replaced with .AsCoreAddr, which returns CORE_ADDR
instead of PtrInt

git-svn-id: trunk@30070 -
2015-03-02 13:38:01 +00:00
nickysn
78676b8f16 + include globdir.inc in the gdb/mi interface units, so that the TARGET_IS_64BIT
define has effect

git-svn-id: trunk@30067 -
2015-03-02 11:28:24 +00:00
pierre
1d865d6422 Add SelectFrameCommand method to TGDBController in gdbcon and gdbmicon units (not yet used in ide code)
git-svn-id: trunk@30066 -
2015-03-02 10:41:35 +00:00
nickysn
1709006ad3 * quote strings in TGDBController.PrintCommand and .PrintFormattedCommand to
allow evaluating expressions which contain spaces

git-svn-id: trunk@30057 -
2015-03-02 00:26:09 +00:00
nickysn
547e20f1a2 * just realized that AnsiStrPas is entirely unnecessary, because typecasting a
pchar to ansistring performs exactly the same thing :)

git-svn-id: trunk@30056 -
2015-03-02 00:03:02 +00:00
nickysn
00e3c906ef * fixed AnsiStrPas
git-svn-id: trunk@30054 -
2015-03-01 23:42:19 +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
nickysn
1e692a2d2e * use -data-evaluate-expression instead of -var-evaluate-expression in the
gdb/mi's TGDBController.PrintCommand() method, because
  -var-evaluate-expressions produces no meaningful results at least with my gdb
  (7.8.2) and according to the docs, requires variable objects to be created
  with -var-create before using it

git-svn-id: trunk@30051 -
2015-03-01 17:28:03 +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
3fe10bfd6c * handle properly debugger errors returned by an exec command in RunExecCommand
git-svn-id: trunk@30021 -
2015-02-27 01:43:26 +00:00
pierre
e4887f22b6 + Check success in TGDBController.StartTrace to avoid SIGSEGV
+ Handle failure in TGDBController.LoadFile

git-svn-id: trunk@29992 -
2015-02-24 16:22:53 +00:00
nickysn
79118e531f * fixed typecast error due to typo after r29795
git-svn-id: trunk@29796 -
2015-02-22 22:02:40 +00:00
nickysn
0a02da23f4 + added gdb/mi methods for obtaining individual register values
git-svn-id: trunk@29795 -
2015-02-22 21:52:18 +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
c5b9465255 * gdb/mi: fixed inserting and stopping on access and read watchpoints
git-svn-id: trunk@29786 -
2015-02-22 01:00:36 +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
eb6c73c3df * the common code to all "-exec" gdb/mi commands moved to a single method
git-svn-id: trunk@29740 -
2015-02-17 20:12:32 +00:00
nickysn
a47a810475 + implemented gdb/mi backtraces
git-svn-id: trunk@29736 -
2015-02-17 00:59:39 +00:00
pierre
6b1c38537b + Add missing windebug unit dependency for windows
+ Use using_cygwin_gdb boolean, to convert path

git-svn-id: trunk@29729 -
2015-02-16 20:50:15 +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