This is the mail archive of the gdb-patches@sourceware.org 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]

Re: Commit: ARM SIM: Add tracing support.


Hi Doug,

Nick, can we tighten up the argument parsing here?
IIUC, -tfoo will get recognized as -t.

Actually this does not happen. You are correct that the code in sim_open() is lax in parsing the command line, but the code in sim_target_parse_command_line() is not. You do get a slightly unhelpful error message however:

  % run -tfoo a.out
  % run: invalid option -- 'f'
  Usage: run [options] program [program args]
  Options:
  [....]

Which implies that you can combine command line options in a manner similar to tar. You cannot however:

  % run -td a.out
  run: invalid option -- 'd'
  [...]

  % run -t -d a.out
  pc: 8120,  movs r0, #22
  pc: 8124,  add  r1, pc, #272    ; 0x110
  [...]

I am not sure if this is worth fixing. I suspect that has been in the simulator common framework for ages.

Cheers
  Nick


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