mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 17:52:47 +02:00
LazDebuggerGdbmi: Improve whitelisted commands for memory limit
git-svn-id: trunk@61067 -
This commit is contained in:
parent
157ea70bdb
commit
dfcb3321a3
@ -10762,13 +10762,41 @@ begin
|
||||
Instr.ApplyArrayLenLimit(DebuggerProperties.MaxLocalsLengthForStaticArray);
|
||||
end
|
||||
else
|
||||
if not( (pos('-exec-', ACommand) = 1) or
|
||||
(pos('-break-', ACommand) = 1) or
|
||||
(pos('-data-list-register-', ACommand) = 1) or
|
||||
(pos('-data-list-changed-registers', ACommand) = 1) or
|
||||
(pos('-data-disassemble', ACommand) = 1) or
|
||||
(pos('-data-read-memory', ACommand) = 1) or
|
||||
(pos('-gdb-exit', ACommand) = 1)
|
||||
if not( (Length(ACommand) < 2) or
|
||||
( (ACommand[1] = '-') and (
|
||||
( (ACommand[2] = 'd') and (
|
||||
(pos('-data-list-register-', ACommand) = 1) or
|
||||
(pos('-data-list-changed-registers', ACommand) = 1) or
|
||||
(pos('-data-disassemble', ACommand) = 1) or
|
||||
(pos('-data-read-memory', ACommand) = 1)
|
||||
)) or
|
||||
( (ACommand[2] = 'g') and (
|
||||
(pos('-gdb-version ', ACommand) = 1) or
|
||||
(pos('-gdb-set ', ACommand) = 1) or
|
||||
(pos('-gdb-exit', ACommand) = 1)
|
||||
)) or
|
||||
( (not(ACommand[2] in ['d', 'g'])) and (
|
||||
(pos('-exec-', ACommand) = 1) or
|
||||
(pos('-file-exec-', ACommand) = 1) or
|
||||
(pos('-break-', ACommand) = 1)
|
||||
))
|
||||
)) or
|
||||
( (ACommand[1] = 'i') and (
|
||||
(pos('info line', ACommand) = 1) or
|
||||
(pos('info address', ACommand) = 1) or
|
||||
(pos('info pid', ACommand) = 1) or
|
||||
(pos('info proc', ACommand) = 1) or
|
||||
(pos('info function', ACommand) = 1) or
|
||||
(pos('interrupt', ACommand) = 1) or
|
||||
(pos('info program', ACommand) = 1)
|
||||
)) or
|
||||
( (ACommand[1] = 's') and (
|
||||
(pos('set ', ACommand) = 1) or
|
||||
(pos('show ', ACommand) = 1)
|
||||
)) or
|
||||
( (ACommand[1] = 'm') and (
|
||||
(pos('maint ', ACommand) = 1)
|
||||
))
|
||||
)
|
||||
then begin
|
||||
Instr.ApplyMemLimit(DebuggerProperties.GdbValueMemLimit);
|
||||
|
Loading…
Reference in New Issue
Block a user