GDB provides a "machine readable" interface -mi
And Lazarus uses this.
But not all commands are available in this. So Lazarus still needs to use some of the human commands.
Over the years GDB responses (English) from many platforms, and lots of gdb versions have been collected. There are already many differences there (last gdb 7.5 changed some spacing, and fooled the IDE).
It will be near impossible to collect all that info, in dozens of extra languages. And even if, it will be a
maintenance issue.
One could add translation files, which the IDE can load, and which the user(s) can maintain. That would actually be a good idea. But I do not know if or when I would have time for that.
----
For now: you can search
debugger\gdbmidebugger.pp
It has all the text fragments. Search for "info program", "info file"
You will find several bits like this or similar
if CmdRes
then CmdRes := ExecuteCommand('info program', R, [], 1500); // Hardcoded timeout
if (not CmdRes)
or (Pos('not being run', R.Values) <= 0)
then begin
You need to change the (Pos('not being run', R.Values) <= 0)
to
(
(Pos('not being run', R.Values) <= 0)
and
(Pos('sido depurado no estaba corriendo', R.Values) <= 0)
)
or similar
Note: it is "and" here, because it is an error, only if both fail. In other cases below, it may be "or"
Otherwise use your language only. But I advice to keep the english, in case the text exists in more than one message, and is not always translated.
----
The following is OK / IT is NOT yet translated
if ExecuteCommand('info program', [], R, [cfCheckState])
then begin
s := GetPart(['child process ', 'child thread ', 'lwp '], [' ', '.', ')'],
----
For info file
if ExecuteCommand('info file', R)
then begin
if rfNoMI in R.Flags
then begin
FileType := GetPart('file type ', '.', R.Values);
EntryPoint := GetPart(['Entry point: '], [#10, #13, '\t'], R.Values);
use "tipo de archivo "
and "Punto de entrada: "
Note spaces at end
"S\303\255mbolos desde \302\253/home/miguel/Programacion/LazarusTest1/project1\302\273.\n"
~"Local exec file:\n"
~"\t`/home/miguel/Programacion/LazarusTest1/project1', tipo de archivo elf64-x86-64.\n"
~"\tPunto de entrada: 0x446cb0\n"
----
If you want threads to update *while* running (it is no problem to skip that) also search for thread-created', 'thread-exited'
""[Nuevo Thread 0x7fffecaf9700"