Re: parse_expression
"Axel Dörfler" <[email protected]> Mon, 28 May 2007 20:14:05 +0200 CEST
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <24381858430-BeMail@zon> |
Ingo Weinhold <bonefish-CFLBMwTPW48UNGrzBIF7/[email protected]> wrote: > > But if you had put [%eip = 0x12345] at the command line, the > > debugger > > would have called parse_expression() directly. > So what you're saying is, if the input line starts with "[" the > debugger > evaluates the whole line as an expression, otherwise it must start > with a > command name and the command parses it's arguments as needed, right? That should more or less be it; even though I wouldn't mind if the '[' is optional, and only necessary when the expression would be ambiguous. > BTW, I think, the "[...]" blocks have to be scanned by the debugger > at any > rate, so that e.g. "db [lastAddress + 10] 20" passes just two > arguments to > the db command ("[lastAddress + 10]" and "20"). That would at least be helpful, indeed - it could be done in the same way as for quotes, I think. > I suppose it would be powered by architecture specific functions > like: > > bool arch_set_iframe_register(struct thread* thread, int > iframeNumber, > const char* registerName, int64 value); > bool arch_get_iframe_register(struct thread* thread, int > iframeNumber, > const char* registerName, int64* value); > > The bool result may as well be a status_t, though the only error I > can > imagine at the moment is that the register name is invalid, > respectively > the register not included in the iframe. Exactly :-) Bye, Axel. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/