This is an archive of the discontinued LLVM Phabricator instance.

[MIPS] Create Unix Signals based on target architecture
ClosedPublic

Authored by jaydeep on Jul 23 2015, 2:37 AM.

Details

Reviewers
clayborg
Summary

The patch creates Unix Signals based on target architecture. For MIPS it creates MipsLinuxSignals.

Diff Detail

Repository
rL LLVM

Event Timeline

jaydeep updated this revision to Diff 30465.Jul 23 2015, 2:37 AM
jaydeep retitled this revision from to [MIPS] Create Unix Signals based on target architecture.
jaydeep updated this object.
jaydeep added a reviewer: clayborg.
jaydeep set the repository for this revision to rL LLVM.
jaydeep added subscribers: lldb-commits, bhushan, slthakur and 2 others.
clayborg requested changes to this revision.Jul 23 2015, 2:21 PM
clayborg edited edge metadata.

Fix logic as suggested in the second inline code snippet.

source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
827

UnixSignals::Create() is a static function. If this is really what you are intending to do this should be:

if (error.Success())
    SetUnixSignals(UnixSignals::Create(GetTarget().GetArchitecture());

But this ins't the intention here. We need to ask if the platform is connected and if so, use the unix signals returned by the platform. It is isn't use UnixSignals::Create(<arch>). So this code should be:

if (error.Success())
{
    PlatformSP platform_sp = GetTarget().GetPlatform():
    if (platform_sp && platform_sp->IsConnected())
        SetUnixSignals(platform_sp->GetUnixSignals());
    else
        SetUnixSignals(UnixSignals::Create(GetTarget().GetArchitecture());
}
`
This revision now requires changes to proceed.Jul 23 2015, 2:21 PM
jaydeep updated this revision to Diff 30559.Jul 23 2015, 9:01 PM
jaydeep edited edge metadata.

Thanks Greg
Addressed review comments.

Could you please find some time to review this?
Thanks

clayborg accepted this revision.Jul 28 2015, 9:01 AM
clayborg edited edge metadata.

Looks good.

This revision is now accepted and ready to land.Jul 28 2015, 9:01 AM
jaydeep closed this revision.Aug 13 2015, 10:09 PM

Closed by commit rL243618