You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

gdbstub_test.S 882B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. .arch i386
  2. .section ".data", "aw", @progbits
  3. watch_me:
  4. .long 0xfeedbeef
  5. .section ".text", "ax", @progbits
  6. .code32
  7. gdbstub_test:
  8. /* 1. Read registers test */
  9. movl $0xea010203, %eax
  10. movl $0xeb040506, %ebx
  11. movl $0xec070809, %ecx
  12. movl $0xed0a0b0c, %edx
  13. movl $0x510d0e0f, %esi
  14. movl $0xd1102030, %edi
  15. int $3
  16. /* 2. Write registers test */
  17. int $3
  18. /* 3. Read memory test */
  19. subl $8, %esp
  20. movl $0x11223344, 4(%esp)
  21. movw $0x5566, 2(%esp)
  22. movb $0x77, (%esp)
  23. int $3
  24. /* 4. Write memory test */
  25. int $3
  26. addl $8, %esp
  27. /* 5. Step test */
  28. int $3
  29. nop
  30. /* 6. Access watch test */
  31. movl $0x600d0000, %ecx
  32. movl watch_me, %eax
  33. movl $0xbad00000, %ecx
  34. int $3
  35. movl $0x600d0001, %ecx
  36. movl %eax, watch_me
  37. movl $0xbad00001, %ecx
  38. int $3
  39. /* 7. Write watch test */
  40. movl $0x600d0002, %ecx
  41. movl %eax, watch_me
  42. movl $0xbad00002, %ecx
  43. int $3
  44. 1:
  45. jmp 1b