Browse Source

Move sources to src/ prepare for tests

master
A.Olokhtonov 3 years ago
parent
commit
95054ae0d4
  1. 1
      .gitignore
  2. 2
      Makefile
  3. 2
      project.4coder
  4. 25
      res/006-composite-types.c
  5. 1
      res/Makefile
  6. 2
      src/Makefile
  7. 0
      src/command.c
  8. 0
      src/common.h
  9. 0
      src/dwarf.c
  10. 0
      src/eh_frame.c
  11. 0
      src/elf_dwarf.h
  12. 0
      src/main.c
  13. 0
      src/util.c

1
.gitignore vendored

@ -5,3 +5,4 @@ res/002-compilation-units @@ -5,3 +5,4 @@ res/002-compilation-units
res/003-recursion
res/004-scoped-variables
res/005-base-types
res/006-composite-types

2
Makefile

@ -1,2 +0,0 @@ @@ -1,2 +0,0 @@
debug:
gcc main.c -g -O0 -o build/trace -Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-switch # -fsanitize=address

2
project.4coder

@ -30,7 +30,7 @@ command_list = { @@ -30,7 +30,7 @@ command_list = {
.footer_panel = false,
.save_dirty_files = true,
.cursor_at_end = true,
.cmd = {{ "make debug", .os = "linux" }},
.cmd = {{ "cd src && make debug && cd ..", .os = "linux" }},
},
};

25
res/006-composite-types.c

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
struct user_struct_1 {
char c_field;
// 3 bytes of padding
int int_field;
long long_field;
};
typedef long l64;
int main(int argc, char **argv)
{
int *int_ptr = (void*) 0x01;
int **int_ptr_ptr = (void *) 0x02;
l64 long_var = 123321;
char c = '0';
const char *const_c = &c;
int arr[10] = { 0 };
struct user_struct_1 str = { 0 };
return(0);
}

1
res/Makefile

@ -4,3 +4,4 @@ all: @@ -4,3 +4,4 @@ all:
gcc -g -o 003-recursion 003-recursion.c
gcc -g -o 004-scoped-variables 004-scoped-variables.c
gcc -g -o 005-base-types 005-base-types.c
gcc -g -o 006-composite-types 006-composite-types.c

2
src/Makefile

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
debug:
gcc main.c -g -O0 -o ../build/trace -Wall -Wextra -Wno-unused-variable -Wno-unused-function -Wno-switch # -fsanitize=address

0
command.c → src/command.c

0
common.h → src/common.h

0
dwarf.c → src/dwarf.c

0
eh_frame.c → src/eh_frame.c

0
elf_dwarf.h → src/elf_dwarf.h

0
main.c → src/main.c

0
util.c → src/util.c

Loading…
Cancel
Save