Recent

Author Topic: Gdbserver debugger backend parameters  (Read 3389 times)

gidesa

  • Full Member
  • ***
  • Posts: 160
Gdbserver debugger backend parameters
« on: April 13, 2024, 12:14:31 pm »
Hello,
setting the debugger backend to "gdbserver" shows a list of parameters.
I managed to set some successfully (architecture, remote hostname, remote ports), but the most part are unclear.
What is the meaning of different parameters?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10799
  • Debugger - SynEdit - and more
    • wiki
Re: Gdbserver debugger backend parameters
« Reply #1 on: April 13, 2024, 03:49:52 pm »
Some very few of them are on https://wiki.freepascal.org/GDB_Debugger_Tips

Especially: DisableLoadSymbolForLibraries.

Many of the others are to work around issues in some versions of gdb.
E.g. all the "quoting" options are only needed if you get errors, and the IDE shows the statement in question had some quoted data (e.g. filename). If you don't get those errors, then you don't need them.

MemLimits... (not sure if they are documented somewhere)
They should map exactly to the relevant configurations for gdb. The IDE will updated them depending on what data it fetches (stack or watches).
This protects from crashes when types are declared that use excessive memory
Code: Pascal  [Select][+][-]
  1. type
  2.   TFoo = array [MinInt..MaxInt] of QWord;
  3.   PFoo = ^TFoo;
variables can only be declared for PFoo, but if the debugger tries to deref them....

Many of the others I need to go diving into the code myself.

gidesa

  • Full Member
  • ***
  • Posts: 160
Re: Gdbserver debugger backend parameters
« Reply #2 on: April 13, 2024, 04:11:50 pm »
Many thanks Martin_fr.

ccrause

  • Hero Member
  • *****
  • Posts: 997
Re: Gdbserver debugger backend parameters
« Reply #3 on: April 13, 2024, 05:44:24 pm »
My interpretation of some of the gdbserver specific properties:

Architecture
Set the target architecture for gdb.  This is only really necessary if gdb is built with multiarch support.

Debugger_Remote_DownloadExe
Issue the -target-download command to gdb, which then loads the executable onto the remote target.  Can be used to load a newly compiled executable onto the remote target, if the debug server supports this.

Debugger_Target_Mode
Specifies the remote connection mode.

InitExec_Mode
Determines the mode under which the InitExec_RemoteTarget command is executed:
  • ieRun - Command is started and not tracked further.
  • ieRunCloseOnStop - Run command and terminate this command process when the debugger is stopped.

InitExec_RemoteTarget
Specifies a command to execute before the remote gdb session is started.  Use this for example to start a qemu session that will act as the remote debug server.

RemoteTimeout
Specifies the time (in seconds) that gdb will wait for a reply from the remote server.

SkipSettingLocalExeName
This is used if the executable to be debugged is only available on the remote target.

 

TinyPortal © 2005-2018