Re: [RFC] breakpoints and function prologues...

Joel Brobecker
2002-08-16T17:17:17Z

> Let me make sure I understand what the Tru64 linker is doing. It
> recognizes that the first two instructions at some function's entry
> point are unnecessary, and then it ... here is where I get vague.
> Does it:
> a) delete those two instructions from the code stream altogether,
> shifting all subsequent instructions down in memory,
> b) leave the instructions there, but adjust the value of the linker
> symbol to point two instructions beyond where it used to, or
> c) leave the instructions and the linker symbol value unchanged, but
> tweak certain jumps to that symbol to actually jump two
> instructions beyond the symbol's value?

The linker is doing c).

> But what you're describing here is a rather different situation: the
> function has multiple entry points, depending on whether (I'm
> guessing) it's reached via an intra- or inter-load module call.
>
> It seems to me there should be a separate gdbarch method to handle
> that, because its semantics are different.

Fair enough. I like this design.

--
Joel