When building a cross-kgdb, suppress the registration of the
standard core target by declaring coreops_suppress_target with initializer. This is also happening for non-cross kgdb, by virtue of having fbsd-threads.c in libgdb and having it do the exact same thing. Since fbsd-threads.c is not included in in libgdb when building a cross debugger, we ended up with more than 1 core file targets (the standard gdb core file target and kgdb's libkvm based core file target) and this behaves the same as not having a core target at all.
This commit is contained in:
parent
cfe2be2b5e
commit
2d34114497
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=260601
@ -53,6 +53,18 @@ __FBSDID("$FreeBSD$");
|
|||||||
|
|
||||||
#include "kgdb.h"
|
#include "kgdb.h"
|
||||||
|
|
||||||
|
#ifdef CROSS_DEBUGGER
|
||||||
|
/*
|
||||||
|
* We suppress the call to add_target() of core_ops in corelow.c because if
|
||||||
|
* there are multiple core_stratum targets, the find_core_target() function
|
||||||
|
* won't know which one to return and returns none. We need it to return
|
||||||
|
* our target. We only have to do that when we're building a cross-debugger
|
||||||
|
* because fbsd-threads.c is part of a native debugger and it too defines
|
||||||
|
* coreops_suppress_target with 1 as the initializer.
|
||||||
|
*/
|
||||||
|
int coreops_suppress_target = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
static CORE_ADDR stoppcbs;
|
static CORE_ADDR stoppcbs;
|
||||||
|
|
||||||
static void kgdb_core_cleanup(void *);
|
static void kgdb_core_cleanup(void *);
|
||||||
|
Loading…
Reference in New Issue
Block a user