Add TD8
This commit is contained in:
parent
7c934bcefb
commit
453d88282f
8 changed files with 588 additions and 0 deletions
27
content/secu_logicielle/td8-gdb/files/Makefile
Normal file
27
content/secu_logicielle/td8-gdb/files/Makefile
Normal file
|
@ -0,0 +1,27 @@
|
|||
CFLAGS=-g -Wall -Wextra -Wno-unused-parameter -Wno-unused-variable -Wno-array-bounds -Wno-stringop-overflow -m32 -no-pie -fno-pie
|
||||
LDFLAGS=-m32
|
||||
LDLIBS=-lpthread
|
||||
C=$(wildcard *.c)
|
||||
O=$(C:.c=)
|
||||
O2=$(C:.c=.O2)
|
||||
|
||||
pframe:
|
||||
curl -o pframe.tgz https://dept-info.labri.fr/~thibault/SecuLog/pframe.tgz && \
|
||||
tar -xf pframe.tgz &&\
|
||||
rm -rf pframe.tgz
|
||||
|
||||
.gdbinit:
|
||||
|
||||
configure: pframe .gdbinit
|
||||
$(shell echo "python import pframe" > .gdbinit)
|
||||
%.O2: %.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -O2 $^ $(LDLIBS) -o $@
|
||||
|
||||
all: $O $(O2)
|
||||
|
||||
PHONY: gdb_%
|
||||
gdb_%: $(subst gdb_,,%)
|
||||
PYTHONPATH=${PWD}/pframe${PYTHONPATH:+:${PYTHONPATH}} gdb $<
|
||||
|
||||
clean:
|
||||
rm -f $O $(O2)
|
Loading…
Add table
Add a link
Reference in a new issue