This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Send QPassSignals packet on attach, and at start for remote platforms
Needs ReviewPublic

Authored by kpdev42 on Feb 20 2023, 6:01 AM.

Details

Summary

Before this patch, lldb did not send signal filtering information (QPassSignals packet) to lldb-server on remote platforms until signal settings were explicitly changed. Patch changes last sent signals version to be initialized with an invalid value instead of 0, so that the signal filtering information is sent to the server when the version is actually 0, which happens on remote platforms when the signal structure is copied and the version is reset. Also changes Process so that the information is sent not only right after launch, but right after attach too to be more consistent.

Diff Detail

Event Timeline

kpdev42 created this revision.Feb 20 2023, 6:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 20 2023, 6:01 AM
kpdev42 requested review of this revision.Feb 20 2023, 6:01 AM

What is the practical impact of the bug you are fixing?

I guess it is something like if you set signal handling info, then attach to something, that info is not used. Until you set it again, then it'll be sent and used.

What is the practical impact of the bug you are fixing?

I guess it is something like if you set signal handling info, then attach to something, that info is not used. Until you set it again, then it'll be sent and used.

The signal filtering settings can only be changed for an already created process, so the bug is that lldb does not send the default settings for remote platforms (for example, ignoring of real-time signals inside lldb-server is not applied)

DavidSpickett resigned from this revision.Apr 20 2023, 6:14 AM

This is probably an obvious change, but I have no experience with this area so I don't feel comfortable approving.