Skip to content

Support debugging with lldb#1327

Merged
cdecker merged 1 commit into
ElementsProject:masterfrom
conanoc:lldb_support
Apr 15, 2018
Merged

Support debugging with lldb#1327
cdecker merged 1 commit into
ElementsProject:masterfrom
conanoc:lldb_support

Conversation

@conanoc
Copy link
Copy Markdown
Contributor

@conanoc conanoc commented Apr 5, 2018

fix #1093

Running with lldb cause SIGINT, which makes waitpid(), read()
returns error with errno as EINTR. This patch retry these calls
to ignore EINTR errors.

Tested only on macOS.

Comment thread ccan/ccan/ptr_valid/ptr_valid.c Outdated
close(batch->to_child);
close(batch->from_child);
waitpid(batch->child_pid, NULL, 0);
while(waitpid(batch->child_pid, NULL, 0) < 0 && errno == EINTR);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately changes to CCAN could should preferably be pushed upstream to CCAN: https://github.com/rustyrussell/ccan

@arowser
Copy link
Copy Markdown
Contributor

arowser commented Apr 6, 2018

Tested pass on macOS 10.12.4

@ZmnSCPxj ZmnSCPxj requested a review from rustyrussell April 6, 2018 02:56
@rustyrussell
Copy link
Copy Markdown
Contributor

Correct fix is to get rid of ptr_valid which is needed by autodata on non-ELF platforms (ie. MacOS).

Ideally someone who knows macos would come up with a clever way of doing autodata there? Otherwise we could generate the type_to_string and json_command arrays using grep...

rustyrussell added a commit to rustyrussell/lightning that referenced this pull request Apr 6, 2018
In particular, this gets some MacOS fixes from ElementsProject#1327.
It also includes a major intmap update which fixes corner cases in traversals,
and requires ccan/bitops.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
cdecker pushed a commit that referenced this pull request Apr 6, 2018
In particular, this gets some MacOS fixes from #1327.
It also includes a major intmap update which fixes corner cases in traversals,
and requires ccan/bitops.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Running with lldb cause SIGINT, which makes waitpid() returns
error with errno as EINTR. This patch retry waitpid() to ignore
EINTR errors.
@conanoc
Copy link
Copy Markdown
Contributor Author

conanoc commented Apr 10, 2018

Removed other changes except bitcoind.c from the previous commit.

@conanoc
Copy link
Copy Markdown
Contributor Author

conanoc commented Apr 11, 2018

@ZmnSCPxj @rustyrussell I think this patch is ready. Please take a look.

@ZmnSCPxj
Copy link
Copy Markdown
Contributor

ACK 474cc1b

@cdecker
Copy link
Copy Markdown
Member

cdecker commented Apr 15, 2018

ACK 474cc1b

@cdecker cdecker merged commit b2f7e9a into ElementsProject:master Apr 15, 2018
Saibato pushed a commit to Saibato/lightning that referenced this pull request Apr 17, 2018
In particular, this gets some MacOS fixes from ElementsProject#1327.
It also includes a major intmap update which fixes corner cases in traversals,
and requires ccan/bitops.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SIGABRT on macOS

5 participants