-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheightLabNotes.txt
More file actions
35 lines (20 loc) · 828 Bytes
/
eightLabNotes.txt
File metadata and controls
35 lines (20 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
GDB: GNU Debugger
Run and start, step through with n, and go into with s, f for finish run of code, c continue to next breakpoint
break file1.c:6
break my_function
break [position] if [expression]
(gdb) info [stuff]
- stuff: functions, breakpoints, etc...
delete [breakpoint name]
(gdb) watch [var_name] //to watch for changes
(gdb) rwatch [expression]
(gdb) print [format][expression]
line will execute/execute change on one line when you move onto next line
Intro to Process Memory
- Stack: push frame invoked, pop with function return
void *malloc (suze_t size);
- Allocates size in bytes and returns a pointer to the allocated memory
void *realloc(void *ptr, size_t size);
- Changes siuze of the memory block pointed to by ptr to size bytes
void free(void *ptr);
- Frees the block of memory pointed to by ptr