tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: netbsd32_{,u}int64 in sys/types.h for compat/sys/siginfo.h



On 23.11.2019 17:29, Christos Zoulas wrote:
> In article <qr9j2b$17nj$1%blaine.gmane.org@localhost>,
> Christos Zoulas <christos%astron.com@localhost> wrote:
>> In article <468095c0-b973-7f23-1cfa-3dc19e3b8ddb%gmail.com@localhost>,
>> Rin Okuyama  <rokuyama.rk%gmail.com@localhost> wrote:
>>> On 2019/11/22 10:56, Christos Zoulas wrote:
>>>> In article <679493cf-3e85-f56d-85e4-dfaf7958a379%gmail.com@localhost>,
>>>> Rin Okuyama  <rokuyama.rk%gmail.com@localhost> wrote:
>>> ...
>>>>> This was my misunderstanding. These codes are used when tracer is 64-bit
>>>>> and traced is 32-bit. Don't know whether this is useful though...
>>>>
>>>> Yes, and someone broke them because all the ptrace 64->32 calls for
>>>> registers seem to return 0 now. Was that code changed recently?
>>> ...
>>>
>>> I fixed it:
>>> http://mail-index.netbsd.org/source-changes/2019/11/22/msg111068.html
>>>
>>> Now, gdb/amd64 seems to work for i386 binaries to some extent, at least.
>>
>> Thanks! I think that the gdb on head should working for i386 binaries
>> on amd64. I am installing a new kernel and userland and I will test
>> shortly.
> 
> And it works fine for both static and dynamic binaries. We could also add
> kernel debugging support for i386 kernels, but that needs changes in
> the i386 header files:
> 
> 1. Everywhere s/#include <machine/#include <i386/
>    I think this is a good change anyway for all MD headers because they
>    expect to load their own arch stuff. MI stuff needs to stay "<machine"
> 2. change __vaddr_t in segments.h ld_descriptor to uint32_t
>    That should have no impact and it is a good change because it is a
>    packed structure and needs to be fixed size.
> 3. Add some fixed field sizes in struct pcb instead of pointers with
>    #ifdef __x86_64__ (or copy struct pcb into gdb like kamil did). This
>    is just ugly, but I think it is better than copying the struct. I
>    could add a comment explaining why.
> 
> Is it worth it?
> 

I consider fixing this as required.

> chritod
> 


Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index