Re: [PATCH 00/28] Decouple inferior_ptid/inferior_thread(); dup ptids in thread list (PR/25412)

Simon Marchi
2020-04-15T15:04:58Z

On 2020-04-14 3:24 p.m., Pedro Alves via Gdb-patches wrote:
> On 4/14/20 7:46 PM, Hannes Domani via Gdb-patches wrote:
>> Am Dienstag, 14. April 2020, 19:54:45 MESZ hat Pedro Alves via Gdb-patches <gdb-patches@sourceware.org> Folgendes geschrieben:
>>
>>> In PR/25412, Simon noticed that after the multi-target series, the
>>> tid-reuse.exp testcase manages to create a duplicate thread in the
>>> thread list.  Or rather, two threads with the same PTID.
>>
>> I'm sorry to hijack this thread, but I just wanted to apply this patch series
>> for testing, but I'm already stuck on the first step.
>
> Thanks much for testing!
>
>> How do you get patches from these mails that I then can use with "git am"
>> (or some other git command)?
>>
>> For single patches I would just use the raw email, that seems to work fine,
>> but I thought there probably exists a simpler way for larger series that I
>> don't know about.
>
> In Thunderbird, I select all the emails, right click, and then select
> "save selected messages" -> "as Mbox file". Them I use git am.
> I'm not sure whether that's native functionality, or whether it
> comes from the "ImportExportTools" add-on.

I don't see it in my Thunderbird, so it must be the add-on.

I do almost the same, but using some built-in features: select the messages and
hit "ctrl-s" to save the messages in some directory. In this case, they are
saved as one message per file. I then do `git am path/to/that/directory/*`.

For a single patch, I sometimes display the source (ctrl-u) and copy it all. I
then do `git am`, which makes it read on stdin. Paste, then ctrl-d to send
EOF. The caveat here is that if the patch contains some weird ascii character
(like the "horizontal tab" characters that are sometimes in the GDB source),
it looks like the paste messes it up and the patch doesn't apply. Saving the
file as described previously works fine.

This works well when the patches were send with git-send-email, and is almost
always a pain otherwise.

>
> I have
>
> [format]
> useAutoBase = true
>
> in my .gitconfig, which is what puts that
>
> base-commit: dd1cab0694592099854e66467319253954c93764
>
> line at the bottom of the cover letter. That's the commit
> on top of which the series applies.

This means you also save the cover letter in your mbox file?

Simon