This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Bug in i386_process_record?


On Tue, Aug 25, 2009 at 03:18, Eli Zaretskii<eliz@gnu.org> wrote:
>> From: Hui Zhu <teawater@gmail.com>
>> Date: Mon, 24 Aug 2009 08:00:29 +0800
>> Cc: gdb-patches@sourceware.org
>>
>> #rep stos %eax,%es:(%edi)
>> $edi + 0 = 0x8049660 blob1
>> $edi + $es != 0x8049660 blob1
>
> Well, of course! %es:(%edi) does _not_ mean $es+$edi, it means that
> $edi is used to address the section whose segment descriptor's index
> (a.k.a. selector) is in $es. ?That is, in your case, 0x7b is the
> selector that identifies the segment descriptor of the section where
> blob1[] is stored (.bss, if my rusty memory doesn't deceive me).
>
> Am I missing something? ?If not, what was this example supposed to
> prove, exactly?
>

I check the code about Kernel and read some X86 spec about it.
It seems that the segment (It is not the section)  registers in x86
protect mode is just help MMU to get the physical address.  It's
transparent for the user level program.

What do you think about remove this warning from this patch?

Thanks,
Hui


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]