Re: GDB can't access mapped memory

From: Tauno Voipio (tauno.voipio_at_iki.fi.NOSPAM.invalid)
Date: 10/06/05


Date: Thu, 06 Oct 2005 20:07:52 GMT

Hans-J. Ude wrote:
> I'm writing a program which communicates with a custom PCI card and I
> need access to the card's memory. I use something like pVirt =
> mmap(...) and everything seems to work fine. The problem is that GDB
> is unable to access this pointer which is a flaw for me because i
> assign a big structure to the pointer which holds important varibles.
> Is there a way to give GDB access to that memory? I forgot to say
> that it's an i86 system and GDB version is 6.3 IIRC.
>

Are you talking about access in kernel or user mode?

The usual GDB cannot access kernel mode addresses, you
need the kgdb for that.

-- 
Tauno Voipio
tauno voipio (at) iki fi


Relevant Pages

  • [Full-disclosure] Multiple BSD libc/regcomp(3) Multiple Vulnerabilities
    ... GNU regcomp() code is different from BSD. ... and get better control over memory usage. ... # gdb -q proftpd 15814 ...
    (Full-Disclosure)
  • [UNIX] HPUX ftpd remote issue via REST
    ... to the REST command can be used to specify a memory address to read from. ... This allows an attacker for example to easily read the root password from ... If we take a look in gdb we can see how this bug becomes exploitable. ... frieza elguapo $ ftp 192.168.1.111 ...
    (Securiteam)
  • Re: Is this a leakage in virtual memory abstraction?
    ... A memory leak involves losing pointers to dynamically allocated memory ... char three; ... The GDB session is as follows ... x/x tells your debugger to display a *FOUR BYTE INTEGER*, ...
    (comp.lang.c.moderated)
  • Re: bin/144214: zfsboot fails on gang block after upgrade to zfs v14
    ... gang blocks in them. ... So I decided to debug the crash with gdb. ... 0xA000 is where _code_ from gptzfsboot.out ends up being loaded in memory. ... memory dump was taken after gdb stopped at the above break point. ...
    (freebsd-hackers)
  • Re: bin/144214: zfsboot fails on gang block after upgrade to zfs v14
    ... When I initially added the code, I wasn't able to test it and it turned out the the issue that I was trying to resolve wasn't actually gang block related anyway. ... So I decided to debug the crash with gdb. ... 0xA000 is where _code_ from gptzfsboot.out ends up being loaded in memory. ... memory dump was taken after gdb stopped at the above break point. ...
    (freebsd-hackers)