[Haifux] some addendums to today's gdb meeting

guy keren choo at actcom.co.il
Mon May 4 23:04:30 MSD 2009

1. clarification: the command 'watch *(char*)0x65476 == 0'
  puts a hardware watch-point for a single byte at the given address.
  if you want to find a change to an item with a different size (e.g. 4
  bytes), use a different cast: 'watch *(int*)0x65476 == 0'

2. regarding the 'x' command and endianess: you can control the
    assumed-endianness of gdb using 'set endian big', or 'set endian
    little' (the default is 'auto'). use 'show endian' to see the current
    value of this setting.

3. regarding watch points: you can use 'rwatch <expression>' to be
    notified whenever the value of this expression is _read_, so you can
    find when someone access a certain memory area (for example).

4. in general 'help <cmd>' or 'help <cmd subcmd....>' gives help about
    this command.

5. regarding checkpoints and fork on windows - indeed it looks like 
cygwin's fork copies all the memory to the new process - which means 
that its a very expensive system call. thus, if your process has a very 
large footprint, or you try to make too many checkpoints - you'll hit 
swapping or the virtual memory limitation of your machine.

6. regarding re-creating a live process from a core file - some people 
already thought about this (as usual). here is an example (i didn't try 
this yet):


i think there was something else we wanted an answer for - does anyone 


More information about the Haifux mailing list