Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 7890dec1 authored by Kevin Pouget's avatar Kevin Pouget
Browse files

fix mistakes

parent 40a1298e
No related branches found
No related tags found
No related merge requests found
prodconsum
prodconsum.dwarf
CFLAGS := -g CFLAGS := -g
all : prodconsum.dwarf HAS_DWARFDUMP := $(shell command -v dwarfdump 2> /dev/null)
TARGET := prodconsum
ifdef HAS_DWARFDUMP
TARGET := ${TARGET} prodconsum.dwarf
endif
ifndef HAS_DWARFDUMP
$(warning "dwarfdump not available, cannot generate prodconsum.dwarf")
endif
all : ${TARGET}
@echo @echo
@echo "###" @echo "###"
@echo "### $< is ready." @echo "### $^ ready."
@echo "###" @echo "###"
@echo @echo
......
...@@ -53,7 +53,7 @@ int main(){ ...@@ -53,7 +53,7 @@ int main(){
pthread_t prod; pthread_t prod;
pthread_t cons; pthread_t cons;
puts("createing first thread"); puts("Creating first thread");
if(pthread_create(&prod, NULL, producer, (void*)&context) != 0){ if(pthread_create(&prod, NULL, producer, (void*)&context) != 0){
puts("Could not create producer thread"); puts("Could not create producer thread");
...@@ -63,7 +63,7 @@ int main(){ ...@@ -63,7 +63,7 @@ int main(){
return(EXIT_FAILURE); return(EXIT_FAILURE);
} }
puts("createing second thread"); puts("Creating second thread");
if(pthread_create(&cons, NULL, consumer, (void*)&context) != 0){ if(pthread_create(&cons, NULL, consumer, (void*)&context) != 0){
puts("Could not create consumer thread"); puts("Could not create consumer thread");
......
...@@ -6,9 +6,8 @@ Preliminary setup ...@@ -6,9 +6,8 @@ Preliminary setup
Prepare and launch the docker container: Prepare and launch the docker container:
HOST_DIR=/$HOME/gdb.py_data/ # absolute path required ; create it manually before HOST_DIR=/home/kevin/gdb.py_debug_data/ # absolute path required
DOCKER_OPT="-v $HOST_DIR:/home/gdb.py/host -e GROUPID=$(id -g) -e USERID=$(id -u) --cap-add sys_ptrace" docker run -it -v $HOST_DIR:/home/gdb.py/host -e GROUPID=$(id -g) -e USERID=$(id -u) --cap-add sys_ptrace kpouget/tuto-gdb.py
docker run -it $DOCKER_OPT kpouget/tuto-gdb.py
Then if you want to share the data with your host, work from `~/host`, otherwise stay in `~`: Then if you want to share the data with your host, work from `~/host`, otherwise stay in `~`:
...@@ -220,4 +219,4 @@ Now you're know the basics of GDB scripting ! Get back to the slides *Part 2*, t ...@@ -220,4 +219,4 @@ Now you're know the basics of GDB scripting ! Get back to the slides *Part 2*, t
2. Return true breakpoint 2. Return true breakpoint
3. Register watchpoint 3. Register watchpoint
4. Step into next call 4. Step into next call
5. Faking function execution 5. Faking function execution
\ No newline at end of file
section
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment