Skip to main content
summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorEugene Tarassov2011-12-05 13:13:20 -0500
committerEugene Tarassov2011-12-05 13:13:20 -0500
commitfc6f2c61add581b658ae34596dc28a9afd4309b6 (patch)
tree9b743f273ace524b653144023a98c3d11ef1cdda /tests
parentb1e5e8ff8a4786378331bbb14c76d60c1e370277 (diff)
downloadorg.eclipse.tcf.agent-fc6f2c61add581b658ae34596dc28a9afd4309b6.tar.gz
org.eclipse.tcf.agent-fc6f2c61add581b658ae34596dc28a9afd4309b6.tar.xz
org.eclipse.tcf.agent-fc6f2c61add581b658ae34596dc28a9afd4309b6.zip
TCF Agent: added handling of EXCEPTION_IN_PAGE_ERROR; Some code cleanup.
Diffstat (limited to 'tests')
-rw-r--r--tests/test-dwarf/tcf/backend/backend.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/test-dwarf/tcf/backend/backend.c b/tests/test-dwarf/tcf/backend/backend.c
index cf6eda1c..e0e07388 100644
--- a/tests/test-dwarf/tcf/backend/backend.c
+++ b/tests/test-dwarf/tcf/backend/backend.c
@@ -20,6 +20,7 @@
#include <sys/stat.h>
#include <assert.h>
#include <stdio.h>
+#include <fcntl.h>
#if !defined(WIN32) || defined(__CYGWIN__)
# include <dirent.h>
#endif
@@ -575,11 +576,18 @@ static void add_dir(const char * dir_name) {
add_dir(path);
}
else {
- if (files_cnt >= files_max) {
- files_max += 8;
- files = (char **)loc_realloc(files, files_max * sizeof(char *));
+ int fd = open(path, O_RDONLY | O_BINARY, 0);
+ if (fd < 0) {
+ printf("File %s: %s\n", path, errno_to_str(errno));
+ }
+ else {
+ close(fd);
+ if (files_cnt >= files_max) {
+ files_max += 8;
+ files = (char **)loc_realloc(files, files_max * sizeof(char *));
+ }
+ files[files_cnt++] = loc_strdup(path);
}
- files[files_cnt++] = loc_strdup(path);
}
}
}

Back to the top