This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

A question about the user command parser?


If I include a script file that contains these commands

define if_testfunc
printf "hello\n"
end

define testfunc
  if_testfunc
end

and then look at them from within gdb using show user "command" I get

(gdb) source test.cmd 
(gdb) show user testfunc
User command testfunc:
  if testfunc
  end

(gdb) show user if_testfunc
User command if_testfunc:
  printf "hello\n"

The command if_testfunc has been parsed to be if testfunc and now causes
an error when executing testfunc.

Is it a limitation that the user command names cannot contain a string
containing any other inbuilt command name at the start?



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]