commit 8064b84908439d34f2d8c11f09107d7e226d3809 from: Omar Polo date: Tue Jul 20 08:24:32 2021 UTC add about:crash commit - 774690f252050b81d6f2c737e9c71111088a23ec commit + 8064b84908439d34f2d8c11f09107d7e226d3809 blob - 94c3c82db65faac2f0ac4724397eb51bc8f3a176 blob + 98ad90bfafd1a8dd7053c6932476b4396bb5cf81 --- .gitignore +++ .gitignore @@ -1,6 +1,7 @@ TAGS .deps compat/.deps +pages/about_crash.gmi pages/about_new.gmi phos/.deps phos/.dirstamp blob - ca988189d427a81cabe4624acda89bc4a82dacc7 blob + a66906bb5e29db3235909bdcc0c709bb9b51dbe3 --- Makefile.am +++ Makefile.am @@ -76,3 +76,4 @@ pages.c: pagebundler $(srcdir)/pages.h ${PAGES} ./pagebundler -f $(srcdir)/pages/about_help.gmi -v about_help >> $@ ./pagebundler -f $(srcdir)/pages/about_license.gmi -v about_license >> $@ ./pagebundler -f $(srcdir)/pages/about_new.gmi -v about_new >> $@ + ./pagebundler -f $(srcdir)/pages/about_crash.gmi -v about_crash >> $@ blob - 31071b7edfa7909b93e918c4ca6ba19ffffb614b blob + 55d091a6a178eb28b3da7508c391001626a5507d --- configure.ac +++ configure.ac @@ -88,6 +88,7 @@ AC_CONFIG_HEADERS([config.h]) AC_CONFIG_FILES([ Makefile pages/about_new.gmi + pages/about_crash.gmi ]) AC_OUTPUT blob - 5283734cca4ad0227508cc4b03ba115147d1b13b blob + 8a803f10ae2871a1068d20eb8d286357f2740cac --- fs.c +++ fs.c @@ -127,6 +127,7 @@ handle_get(struct imsg *imsg, size_t datalen) {"about:about", NULL, about_about, about_about_len}, {"about:blank", NULL, about_blank, about_blank_len}, {"about:bookmarks", serve_bookmarks, 0, 0}, + {"about:crash", NULL, about_crash, about_crash_len}, {"about:help", NULL, about_help, about_help_len}, {"about:license", NULL, about_license, about_license_len}, {"about:new", NULL, about_new, about_new_len}, blob - /dev/null blob + 096347e0794710c42602dd5c163eb359ef4ad357 (mode 644) --- /dev/null +++ pages/about_crash.gmi.in @@ -0,0 +1,45 @@ +# Oops + +It seems that Telescope crashed last time! Please consider reporting this bug so it can be fixed. + +=> mailto:@PACKAGE_BUGREPORT@ @PACKAGE_BUGREPORT@ + +When reporting a bug, its useful to include the following information, otherwise it won’t be helpful: + +* Operating system +* Telescope version (i.e. @PACKAGE_STRING@) +* how to reproduce the crash, if known + +In addition, the backtrace (i.e. the state of the program at the moment of the crash) contains invaluable data to unveil the source of the bug. Obtaining a backtrace is usually simple, but unfortunately depends on your system. + +On most system, you should find a file named ‘telescope.core’ or ‘.core’ or just ‘core’ in the directory where you launched telescope (probably your home). + +Your shell may be configured to disallow coredumps. If + +> $ ulimit -c + +prints 0 then you’ll need to enable coredumps using + +> $ ulimits -c unlimited + +and try to reproduce the bug again. + +To open a core file you need to install ‘gdb’ (the GNU debugger) and type + +> $ gdb telescope path/to/core-file + +If you’re using a linux distro with systemd (Arch, Fedora, Debian, ...) you have to use coredumpctl to obtain a backtrace. Please refer to the following page on the Arch wiki: + +> https://wiki.archlinux.org/title/Core_dump + +in particular the “Examining a core dump” section. + +At this point you should be at the GDB prompt. Just type ‘bt’, press enter and copy all the output in a mail to @PACKAGE_BUGREPORT@. + +> (gdb) bt +> ...prints lots of useful information... +> (gdb) + +To quit gdb, just type ‘q’ and enter. + +Thanks! blob - a5abba97cf0c7adb1c835482616b321b5e8e4024 blob + 4bb343be226b5c1c85b2876cb6dbed8ce5dde200 --- pages.h +++ pages.h @@ -26,6 +26,9 @@ extern size_t about_about_len; extern const uint8_t about_blank[]; extern size_t about_blank_len; +extern const uint8_t about_crash[]; +extern size_t about_crash_len; + extern const uint8_t about_help[]; extern size_t about_help_len;