This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
+ +int main(int argc, char *argv[]) +{ + if (argc< 2) + usage(argv[0]); + else + { + const char *const libname = argv[1]; + int i, fd, count = 1; + struct stat st; + + if (argc> 2) + count = atoi (argv[2]); + + if ((fd = open (libname, O_RDONLY)) == -1) + { + fprintf (stderr, "open (\"%s\", O_RDONLY): %s\n", libname, strerror (errno));
+ exit (1); + } + + if (fstat (fd,&st) != 0) + { + fprintf (stderr, "fstat (\"%d\"): %s\n", fd, strerror (errno)); + exit (1); + } + + for (i = 0; i< count; ++i) + { + const void *const addr = mmap (0, st.st_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
We can use "clean_restart" here.+# Start with a fresh gdb. + +gdb_exit +gdb_start +gdb_reinitialize_dir $srcdir/$subdir +gdb_load $binfile +
+proc one_test {count match_str} { + global solib_binfile gdb_prompt
-- Yao Qi
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |