FreeBSD Bugzilla – Attachment 165277 Details for
Bug 206044
devel/gdb: Misc KGDB fixes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
gdb_port_kgdb2.patch
gdb_port_kgdb2.patch (text/plain), 5.66 KB, created by
John Baldwin
on 2016-01-08 19:49:09 UTC
(
hide
)
Description:
gdb_port_kgdb2.patch
Filename:
MIME Type:
Creator:
John Baldwin
Created:
2016-01-08 19:49:09 UTC
Size:
5.66 KB
patch
obsolete
>Index: devel/gdb/Makefile >=================================================================== >--- devel/gdb/Makefile (revision 405586) >+++ devel/gdb/Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= gdb > PORTVERSION= 7.10 >-PORTREVISION= 4 >+PORTREVISION= 5 > CATEGORIES= devel > MASTER_SITES= GNU > >Index: devel/gdb/files/kgdb/amd64fbsd-kern.c >=================================================================== >--- devel/gdb/files/kgdb/amd64fbsd-kern.c (revision 405586) >+++ devel/gdb/files/kgdb/amd64fbsd-kern.c (working copy) >@@ -210,7 +210,7 @@ > } > > static const struct frame_unwind amd64fbsd_trapframe_unwind = { >- NORMAL_FRAME, >+ SIGTRAMP_FRAME, > default_frame_unwind_stop_reason, > amd64fbsd_trapframe_this_id, > amd64fbsd_trapframe_prev_register, >Index: devel/gdb/files/kgdb/fbsd-kld.c >=================================================================== >--- devel/gdb/files/kgdb/fbsd-kld.c (revision 405586) >+++ devel/gdb/files/kgdb/fbsd-kld.c (working copy) >@@ -386,9 +386,6 @@ > { > struct kld_info *info; > >- if (!have_partial_symbols()) >- return; >- > info = get_kld_info(); > > /* >Index: devel/gdb/files/kgdb/i386fbsd-kern.c >=================================================================== >--- devel/gdb/files/kgdb/i386fbsd-kern.c (revision 405586) >+++ devel/gdb/files/kgdb/i386fbsd-kern.c (working copy) >@@ -277,7 +277,7 @@ > } > > static const struct frame_unwind i386fbsd_dblfault_unwind = { >- NORMAL_FRAME, >+ SIGTRAMP_FRAME, > default_frame_unwind_stop_reason, > i386fbsd_dblfault_this_id, > i386fbsd_dblfault_prev_register, >@@ -436,7 +436,7 @@ > } > > static const struct frame_unwind i386fbsd_trapframe_unwind = { >- NORMAL_FRAME, >+ SIGTRAMP_FRAME, > default_frame_unwind_stop_reason, > i386fbsd_trapframe_this_id, > i386fbsd_trapframe_prev_register, >Index: devel/gdb/files/kgdb/kgdb-main.c >=================================================================== >--- devel/gdb/files/kgdb/kgdb-main.c (revision 405586) >+++ devel/gdb/files/kgdb/kgdb-main.c (working copy) >@@ -62,10 +62,10 @@ > > #include "kgdb.h" > >-static int dumpnr; > static int verbose; > > static char crashdir[PATH_MAX]; >+static char *dumpnr; > static char *kernel; > static char *remote; > static char *vmcore; >@@ -96,7 +96,7 @@ > } > > static void >-kernel_from_dumpnr(int nr) >+kernel_from_dumpnr(const char *nr) > { > char line[PATH_MAX], path[PATH_MAX]; > FILE *info; >@@ -110,7 +110,7 @@ > * subdirectory kernel.<nr> and called kernel. The latter allows us > * to collect the modules in the same place. > */ >- snprintf(path, sizeof(path), "%s/kernel.%d", crashdir, nr); >+ snprintf(path, sizeof(path), "%s/kernel.%s", crashdir, nr); > if (stat(path, &st) == 0) { > if (S_ISREG(st.st_mode)) { > kernel = strdup(path); >@@ -117,7 +117,7 @@ > return; > } > if (S_ISDIR(st.st_mode)) { >- snprintf(path, sizeof(path), "%s/kernel.%d/kernel", >+ snprintf(path, sizeof(path), "%s/kernel.%s/kernel", > crashdir, nr); > if (stat(path, &st) == 0 && S_ISREG(st.st_mode)) { > kernel = strdup(path); >@@ -133,7 +133,7 @@ > * with debugging info (called either kernel.full or kernel.debug). > * If we have a debug kernel, use it. > */ >- snprintf(path, sizeof(path), "%s/info.%d", crashdir, nr); >+ snprintf(path, sizeof(path), "%s/info.%s", crashdir, nr); > info = fopen(path, "r"); > if (info == NULL) { > warn("%s", path); >@@ -223,7 +223,7 @@ > char *s; > int a, ch; > >- dumpnr = -1; >+ dumpnr = NULL; > > strlcpy(crashdir, "/var/crash", sizeof(crashdir)); > s = getenv("KGDB_CRASH_DIR"); >@@ -284,13 +284,7 @@ > annotation_level = 1; > break; > case 'n': /* use dump with given number. */ >- dumpnr = strtol(optarg, &s, 0); >- if (dumpnr < 0 || *s != '\0') { >- warnx("option %c: invalid kernel dump number", >- optopt); >- usage(); >- /* NOTREACHED */ >- } >+ dumpnr = optarg; > break; > case 'q': > kgdb_quiet = 1; >@@ -317,7 +311,7 @@ > } > } > >- if (((vmcore != NULL) ? 1 : 0) + ((dumpnr >= 0) ? 1 : 0) + >+ if (((vmcore != NULL) ? 1 : 0) + ((dumpnr != NULL) ? 1 : 0) + > ((remote != NULL) ? 1 : 0) > 1) { > warnx("options -c, -n and -r are mutually exclusive"); > usage(); >@@ -330,13 +324,13 @@ > if (argc > optind) > kernel = strdup(argv[optind++]); > >- if (argc > optind && (dumpnr >= 0 || remote != NULL)) { >+ if (argc > optind && (dumpnr != NULL || remote != NULL)) { > warnx("options -n and -r do not take a core file. Ignored"); > optind = argc; > } > >- if (dumpnr >= 0) { >- snprintf(path, sizeof(path), "%s/vmcore.%d", crashdir, dumpnr); >+ if (dumpnr != NULL) { >+ snprintf(path, sizeof(path), "%s/vmcore.%s", crashdir, dumpnr); > if (stat(path, &st) == -1) > err(1, "%s", path); > if (!S_ISREG(st.st_mode)) >@@ -372,7 +366,7 @@ > > /* If we don't have a kernel image yet, try to find one. */ > if (kernel == NULL) { >- if (dumpnr >= 0) >+ if (dumpnr != NULL) > kernel_from_dumpnr(dumpnr); > > if (kernel == NULL) >Index: devel/gdb/files/kgdb/ppcfbsd-kern.c >=================================================================== >--- devel/gdb/files/kgdb/ppcfbsd-kern.c (revision 405586) >+++ devel/gdb/files/kgdb/ppcfbsd-kern.c (working copy) >@@ -189,7 +189,7 @@ > > static const struct frame_unwind ppcfbsd_trapframe_unwind = > { >- NORMAL_FRAME, >+ SIGTRAMP_FRAME, > default_frame_unwind_stop_reason, > ppcfbsd_trapframe_this_id, > ppcfbsd_trapframe_prev_register, >Index: devel/gdb/files/kgdb/sparc64fbsd-kern.c >=================================================================== >--- devel/gdb/files/kgdb/sparc64fbsd-kern.c (revision 405586) >+++ devel/gdb/files/kgdb/sparc64fbsd-kern.c (working copy) >@@ -159,7 +159,7 @@ > > static const struct frame_unwind sparc64fbsd_trapframe_unwind = > { >- NORMAL_FRAME, >+ SIGTRAMP_FRAME, > default_frame_unwind_stop_reason, > sparc64fbsd_trapframe_this_id, > sparc64fbsd_trapframe_prev_register,
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
luca.pizzamiglio:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 206044
: 165277