Re: wrapping diassembled code
From: Paul Pluzhnikov (ppluzhnikov_at_earthlink.net)
Date: 04/28/03
- Next message: Chuck Dillon: "Re: writing bytes to file in ksh"
- Previous message: Paul Pluzhnikov: "Re: creating a thread in c++ in unix (must it be POSIX?)"
- In reply to: Allan Adler: "Re: wrapping diassembled code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 28 Apr 2003 15:05:25 GMT
Allan Adler <ara@nestle.ai.mit.edu> writes:
> Paul Pluzhnikov <ppluzhnikov@earthlink.net> kindly pointed out the
[Please use "emacs/GNUS" 'F' key for followups. This inserts a
'References:' field into your message, which then allows threaded
newsreaders (e.g. GNUS) to associate your article with its thread,
and makes it easy to see if anybody followed up on your message.]
> On the other hand, I think there is also
> something missing from the output of
> objdump -dr y.o
Indeed. What is missing is the info about any data costants (and
string constants) used, just as you discovered.
You never actually posted your original error.c, and the little
test case I've made didn't include any data references ...
> I placed
> .LC0:
> .string "line %d: %s\n"
> at the beginning.
And referenced it in the assembly as "pushl $.LC0" ?
> The resulting file will compile with the others and produce
> an executable. When it is given erroneous input, it doesn't crash but it
> doesn't behave correctly either. Instead it gives error messages that don't
> derive from the program. E.g. "input not syncrhonized", "Identifier removed",
I assure you that these messages *do* derive from the program,
just a different place in it. You can do:
strings -a a.out | grep 'Identifier removed'
to confirm that.
> and "Unknown error 256", at various times. So I don't seem to be able to guess
> correctly how to insert this format string, even when I know it has to be
> there.
Well, how did you insert it?
[I suggest you abandon the whole 'error.c' idea, and start with a
trivial main.c, which can then be posted/discussed in its entirety.
Once you know how to do an equivalent main.s, error.s would become
easier].
Cheers,
-- In order to understand recursion you must first understand recursion.
- Next message: Chuck Dillon: "Re: writing bytes to file in ksh"
- Previous message: Paul Pluzhnikov: "Re: creating a thread in c++ in unix (must it be POSIX?)"
- In reply to: Allan Adler: "Re: wrapping diassembled code"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|