diff options
| author | Andrea Possemato | 2016-04-05 11:18:59 +0200 |
|---|---|---|
| committer | jvoisin | 2016-04-05 11:18:59 +0200 |
| commit | d82685c027edef9f7ca73a98413d7ec562391dbd (patch) | |
| tree | 602c7f479b9f36bcd6d65e9f933d52e19d20c34c /detect/main.c | |
| parent | 8356443afb0c80d49246ff41b7942bba7c76a7c6 (diff) | |
Add gdb detection via environment variables
Diffstat (limited to 'detect/main.c')
| -rw-r--r-- | detect/main.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/detect/main.c b/detect/main.c index 09e7515..47b9c19 100644 --- a/detect/main.c +++ b/detect/main.c | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include "gdb.h" | 7 | #include "gdb.h" |
| 8 | #include "various.h" | 8 | #include "various.h" |
| 9 | 9 | #include "env.h" | |
| 10 | 10 | ||
| 11 | int main(int argc, char** argv){ | 11 | int main(int argc, char** argv){ |
| 12 | unsigned int res = 0; | 12 | unsigned int res = 0; |
| @@ -68,5 +68,28 @@ int main(int argc, char** argv){ | |||
| 68 | else | 68 | else |
| 69 | printf("\n[ ] Everything seems fine\n"); | 69 | printf("\n[ ] Everything seems fine\n"); |
| 70 | 70 | ||
| 71 | res = 0; | ||
| 72 | printf("\n\n"); | ||
| 73 | printf(".: GDB env detector :.\n\n"); | ||
| 74 | |||
| 75 | if(res += gdb_columns()) | ||
| 76 | printf("[x] COLUMNS_ENV\n"); | ||
| 77 | else | ||
| 78 | printf("[ ] COLUMNS_ENV\n"); | ||
| 79 | |||
| 80 | if(res += gdb_lines()) | ||
| 81 | printf("[x] LINES_ENV\n"); | ||
| 82 | else | ||
| 83 | printf("[ ] LINES_ENV\n"); | ||
| 84 | |||
| 85 | if(res += gdb_path()) | ||
| 86 | printf("[x] GDB_ENV\n"); | ||
| 87 | else | ||
| 88 | printf("[ ] GDB_ENV\n"); | ||
| 89 | |||
| 90 | if(res) | ||
| 91 | printf("\n[*] GDB detected\n"); | ||
| 92 | else | ||
| 93 | printf("\n[ ] No GDB detected\n"); | ||
| 71 | return 0; | 94 | return 0; |
| 72 | } | 95 | } |
