pstrace

Форк
0
/
script.gdb 
68 строк · 1.2 Кб
1
# http://sourceware.org/gdb/wiki/FAQ: to disable the
2
# "---Type <return> to continue, or q <return> to quit---"
3
# in batch mode:
4
set width 0
5
set height 0
6
set verbose off
7
# enable breakpoint pending on future shared library load in batch
8
set breakpoint pending on
9
dashboard -enabled off
10
handle SIGSEGV nostop noprint
11

12
b _start
13
commands 1
14
  p $rsp
15
  info frame
16
  info registers
17
  continue
18
end
19

20
# at __libc_start_main point - print RSP
21
b __libc_start_main
22
commands 2
23
  p $rsp
24
  info frame
25
  info registers
26
  continue
27
end
28

29
# at entry point - print RSP
30
b main
31
commands 3
32
  p $rsp
33
  info frame
34
  info registers
35
  continue
36
end
37

38
# at Fun1 point - print RSP
39
b Fun1
40
commands 4
41
  p $rsp
42
  info frame
43
  info registers
44
  continue
45
end
46

47
# at Fun2 point - print RSP
48
b Fun2
49
commands 5
50
  p $rsp
51
  info frame
52
  info registers
53
  printf "\n"
54
  continue
55
end
56

57
# show arguments for program
58
#show args
59
#printf "Note, however: in batch mode, arguments will be ignored!\n"
60

61
# note: even if arguments are shown;
62
# must specify cmdline arg for "run"
63
# when running in batch mode! (then they are ignored)
64
# below, we specify command line argument "2":
65
run      # run
66

67
#start # alternative to run: runs to main, and stops
68
#continue
69

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.