diff options
author | Keith Seitz <keiths@redhat.com> | 2017-08-17 13:58:01 -0700 |
---|---|---|
committer | Keith Seitz <keiths@redhat.com> | 2017-08-17 13:58:01 -0700 |
commit | b5f28d7abc02ca509e389fa932d725cf111e4b40 (patch) | |
tree | 57a0dc0feaff890630a6ba2c9fab811d56b1f9cf /gdb/nat/linux-btrace.c | |
parent | 2a95a158fae932f758d75a1178a40d4cc4804ff0 (diff) | |
parent | 1a457753cfad05989574c671a221ffce2d5df703 (diff) | |
download | binutils-users/pmuldoon/c++compile.zip binutils-users/pmuldoon/c++compile.tar.gz binutils-users/pmuldoon/c++compile.tar.bz2 |
Update w/HEADusers/pmuldoon/c++compile
Problems:
gdb/compile/compile.c
gdb/cp-support.c
gdb/cp-support.h
gdb/gdbtypes.h
gdb/language.c
gdb/linespec.c
Diffstat (limited to 'gdb/nat/linux-btrace.c')
-rw-r--r-- | gdb/nat/linux-btrace.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gdb/nat/linux-btrace.c b/gdb/nat/linux-btrace.c index b2c84c1..1a383b7 100644 --- a/gdb/nat/linux-btrace.c +++ b/gdb/nat/linux-btrace.c @@ -204,24 +204,23 @@ linux_determine_kernel_start (void) { static uint64_t kernel_start; static int cached; - FILE *file; if (cached != 0) return kernel_start; cached = 1; - file = gdb_fopen_cloexec ("/proc/kallsyms", "r"); + gdb_file_up file = gdb_fopen_cloexec ("/proc/kallsyms", "r"); if (file == NULL) return kernel_start; - while (!feof (file)) + while (!feof (file.get ())) { char buffer[1024], symbol[8], *line; uint64_t addr; int match; - line = fgets (buffer, sizeof (buffer), file); + line = fgets (buffer, sizeof (buffer), file.get ()); if (line == NULL) break; @@ -236,8 +235,6 @@ linux_determine_kernel_start (void) } } - fclose (file); - return kernel_start; } |