Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lldb/source/Host/freebsd/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
#include <dlfcn.h>
#include <execinfo.h>

#include "llvm/Object/ELF.h"

#include "lldb/Host/FileSystem.h"
#include "lldb/Host/Host.h"
#include "lldb/Host/HostInfo.h"
Expand All @@ -32,6 +30,7 @@
#include "lldb/Utility/Status.h"
#include "lldb/Utility/StreamString.h"

#include "llvm/Object/ELF.h"
#include "llvm/TargetParser/Host.h"

namespace lldb_private {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ static std::vector<lldb_private::RegisterInfo> &GetSharedRegisterInfoVector() {

static const RegisterInfo *
GetRegisterInfo_i386(const lldb_private::ArchSpec &arch) {
static std::vector<lldb_private::RegisterInfo> g_register_infos(
GetSharedRegisterInfoVector());
static std::vector<lldb_private::RegisterInfo> g_register_infos;

// Allocate RegisterInfo only once
if (g_register_infos.empty()) {
Expand All @@ -93,6 +92,9 @@ GetRegisterInfo_i386(const lldb_private::ArchSpec &arch) {
#define UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
#include "RegisterInfos_x86_64.h"
#undef UPDATE_REGISTER_INFOS_I386_STRUCT_WITH_X86_64_OFFSETS
std::vector<lldb_private::RegisterInfo> &shared_regs =
GetSharedRegisterInfoVector();
shared_regs = g_register_infos;
}

return &g_register_infos[0];
Expand Down
26 changes: 26 additions & 0 deletions lldb/test/Shell/Breakpoint/debug_x86_over_amd64.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# REQUIRES: target-x86_64
# XFAIL: system-windows

# RUN: mkdir -p %t
# RUN: cd %t
# RUN: %clang_host -m32 %p/Inputs/dummy-target.c -o dummy.out
# RUN: %lldb -b -s %s dummy.out | FileCheck %s

breakpoint set -D -n main
# CHECK: Breakpoint {{[0-9]}}: no locations (pending).
# CHECK: Breakpoint set in dummy target

breakpoint list
# CHECK: No breakpoints currently set

breakpoint list -D
# CHECK: name = 'main', locations = 0 (pending)

target delete
# CHECK: 1 targets deleted

target create dummy.out
# CHECK: Current executable set to {{.*}}dummy.out

breakpoint list
# CHECK: name = 'main', locations = {{[1-9]}}
Loading