Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 10th, 2012  |  syntax: GDB  |  size: 1.51 KB  |  hits: 35  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. [pedro@brno][~/gdb/mygit/build/gdb]
  2. >~/gdb/7_4/build/gdb/gdb -nx --write ./foo
  3. GNU gdb (GDB) 7.4.0.20120320-cvs
  4. Copyright (C) 2012 Free Software Foundation, Inc.
  5. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  6. This is free software: you are free to change and redistribute it.
  7. There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  8. and "show warranty" for details.
  9. This GDB was configured as "x86_64-unknown-linux-gnu".
  10. For bug reporting instructions, please see:
  11. <http://www.gnu.org/software/gdb/bugs/>...
  12. Reading symbols from /home/pedro/gdb/mygit/build/gdb/foo...done.
  13. (gdb) p main
  14. $1 = {int (int, char **)} 0x4004c4 <main>
  15. (gdb) p /x *(int *) 0x4004c4
  16. $2 = 0x55555555
  17. (gdb) p /x *(int *) 0x4004c4 = 0xaaaaaaaa
  18. $3 = 0xaaaaaaaa
  19. (gdb) p /x *(int *) 0x4004c4
  20. $4 = 0xaaaaaaaa
  21. (gdb) q
  22. [pedro@brno][~/gdb/mygit/build/gdb]
  23. >~/gdb/7_4/build/gdb/gdb -nx --write ./foo
  24. GNU gdb (GDB) 7.4.0.20120320-cvs
  25. Copyright (C) 2012 Free Software Foundation, Inc.
  26. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  27. This is free software: you are free to change and redistribute it.
  28. There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
  29. and "show warranty" for details.
  30. This GDB was configured as "x86_64-unknown-linux-gnu".
  31. For bug reporting instructions, please see:
  32. <http://www.gnu.org/software/gdb/bugs/>...
  33. Reading symbols from /home/pedro/gdb/mygit/build/gdb/foo...done.
  34. (gdb) p /x *(int *) 0x4004c4
  35. $1 = 0xaaaaaaaa
  36. (gdb)