Subject: Re: DDB: BKPT_SET() API suggestion
To: None <tech-kern@netbsd.org, port-ia64@netbsd.org>
From: Cherry G. Mathew <cherry.g.mathew@gmail.com>
List: tech-kern
Date: 12/21/2005 16:45:28
On 12/21/05, Cherry G. Mathew <cherry.g.mathew@gmail.com> wrote:
> Adding an option to pass the address, where BKPT_SET() would insert
> breakpoint opcodes would help with VLIW instruction encoding for
> Itanium.
>
> On Itanium, individual instruction slots within a VLIW are not
> naturally aligned, although the VLIW 'bundle' itself is.
>
> Until then, breakpoints on NetBSD/ia64 will have VLIW bundle
> granularity. It will only be a minor irritation, as you could single
> step through the individual instruction slots.
>
That one hit a wall too.....
in ddb/db_break.c: db_set_breakpoints():
bkpt->bkpt_inst =3D db_get_value(bkpt->address, BKPT_SIZE, FALSE);
unfortunately, bkpt->bkpt_inst is of type db_addr_t with an implicit
assumption that the instruction encoding size is the same as the
machine word size......
Is there another port which has the same issue ?
The easiest solution for ia64 here, is to rework BKPT_SET() to pass
on address location info as well, so that we could use word size ( 64
bit ) variables to reassemble the VLIW. This is how FreeBSD does it,
and its a simple cut-paste job.
For the Record.
Cheers,
--
~Cherry