This is an archive of the discontinued LLVM Phabricator instance.

[LLDB][MIPS] Add LinuxSignals for mips64 and change trap opcode for mips64el.
ClosedPublic

Authored by slthakur on Apr 7 2015, 5:50 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

slthakur updated this revision to Diff 23321.Apr 7 2015, 5:50 AM
slthakur retitled this revision from to [LLDB][MIPS] Add LinuxSignals for mips64 and change trap opcode for mips64el. .
slthakur updated this object.
slthakur edited the test plan for this revision. (Show Details)
slthakur added reviewers: clayborg, tberghammer.
slthakur set the repository for this revision to rL LLVM.
slthakur added subscribers: jaydeep, bhushan, mohit.bhakkad, Unknown Object (MLST).
emaste added subscribers: Unknown Object (MLST), emaste.Apr 7 2015, 6:15 AM

lldb reviews should have the lldb list as a subscriber instead of llvm
this could do with an explanation of why MIPS needs special signal handling

tberghammer accepted this revision.Apr 7 2015, 6:19 AM
tberghammer edited edge metadata.

Looks good

source/Plugins/Process/Utility/MipsLinuxSignals.cpp
1

(nit: line length)

source/Plugins/Process/Utility/MipsLinuxSignals.h
1

(nit: line length)

This revision is now accepted and ready to land.Apr 7 2015, 6:19 AM

Hi @emaste,

this could do with an explanation of why MIPS needs special signal handling

MIPS needs special signal handling because the signal numbers defined in asm/signal.h in kernel headers for mips are different from signal numbers defined in x86 kernel headers.
Therefore while remote debugging, the remote server(mips64) sends T packets with signals numbers that are defined for mips in signal.h, which is interpreted incorrectly by the client side(x86_64).

clayborg accepted this revision.Apr 7 2015, 10:25 AM
clayborg edited edge metadata.

Looks good.

This revision was automatically updated to reflect the committed changes.
flackr added a subscriber: flackr.Apr 9 2015, 9:04 AM

This seems to have broken the xcode build for me - confirmed that reverting fixes the build failure:

Ld DerivedData/lldb/Build/Products/Debug/LLDB.framework/Versions/A/LLDB normal x86_64

cd /Users/flackr/projects/ll/lldb
export MACOSX_DEPLOYMENT_TARGET=10.8
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -L/Users/flackr/projects/ll/lldb/DerivedData/lldb/Build/Products/Debug -L/Users/flackr/projects/ll/lldb/llvm-build/Release+Asserts/x86_64 -F/Users/flackr/projects/ll/lldb/DerivedData/lldb/Build/Products/Debug -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/PrivateFrameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks -filelist /Users/flackr/projects/ll/lldb/DerivedData/lldb/Build/Intermediates/lldb.build/Debug/LLDB.build/Objects-normal/x86_64/LLDB.LinkFileList -exported_symbols_list resources/lldb-framework-exports -install_name @rpath/LLDB.framework/LLDB -mmacosx-version-min=10.8 -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 -lllvmclang -framework Foundation -framework DebugSymbols -framework Security -framework CoreServices -framework ApplicationServices -stdlib=libc++ -lpanel -lncurses -ledit -lxml2 /Users/flackr/projects/ll/lldb/DerivedData/lldb/Build/Products/Debug/liblldb-core.a -lz -framework CoreFoundation -lobjc -framework Security -single_module -compatibility_version 1 -current_version 340.99.0 -Xlinker -dependency_info -Xlinker /Users/flackr/projects/ll/lldb/DerivedData/lldb/Build/Intermediates/lldb.build/Debug/LLDB.build/Objects-normal/x86_64/LLDB_dependency_info.dat -o /Users/flackr/projects/ll/lldb/DerivedData/lldb/Build/Products/Debug/LLDB.framework/Versions/A/LLDB

Undefined symbols for architecture x86_64:

"lldb_private::process_linux::MipsLinuxSignals::MipsLinuxSignals()", referenced from:
    lldb_private::process_gdb_remote::ProcessGDBRemote::DoConnectRemote(lldb_private::Stream*, char const*) in liblldb-core.a(ProcessGDBRemote.o)

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

  • BUILD FAILED **

The following build commands failed:

Ld DerivedData/lldb/Build/Products/Debug/LLDB.framework/Versions/A/LLDB normal x86_64

(1 failure)

Fixed the Xcode build with:

% svn commit !$
svn commit lldb.xcodeproj/project.pbxproj
Sending lldb.xcodeproj/project.pbxproj
Transmitting file data .
Committed revision 234500.