gdb-discuss
[Top][All Lists]
Advanced

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

[Gdb-discuss] Why GDB can NOT read the content of memory protected(reado


From: MCG LU Fengcheng
Subject: [Gdb-discuss] Why GDB can NOT read the content of memory protected(readonly) from the core file
Date: Fri, 27 May 2005 10:47:26 +0800

Hello all
       When I use the GDB to analyze the core file, I encountered one problem.
In my program, some memory are protected readonly(use mprotect routine).
I want to use the gdb to check the content in these memory, But GDB always
show ZERO in these memory. For example:

(gdb) x/32b buf
0x80499a0 <buf>:        0x00    0x00    0x00    0x00    0x00    0x00    0x00      0x00
0x80499a8 <buf+8>:      0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00
0x80499b0 <buf+16>:     0x00    0x00    0x00    0x00    0x00    0x00    0x00   0x00
0x80499b8 <buf+24>:     0x00    0x00    0x00    0x00    0x00    0x00    0x00   0x00


In Fact, there MUST be non-ZERO data in these memory.

Why?

Best Regards
Lu Fengcheng

----------------------------------------------------------------------------
Division: MCG
Tel: 021-36054510*6261
Email: address@hidden

ut Alcatel Shanghai Bell Co.Ltd

----------------------------------------------------------------------------


reply via email to

[Prev in Thread] Current Thread [Next in Thread]