Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Simon Marchi <simon.marchi@polymtl.ca>
To: Pedro Alves <palves@redhat.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] gdbserver: Use std::list for all_dlls
Date: Mon, 09 Oct 2017 15:46:00 -0000	[thread overview]
Message-ID: <e815115e-1f09-5d83-d173-4aceef786079@polymtl.ca> (raw)
In-Reply-To: <4ca822bf-81c1-ff9e-c6a8-99ef44ba7d61@redhat.com>

On 2017-10-09 11:33 AM, Pedro Alves wrote:
> On 10/09/2017 04:12 PM, Simon Marchi wrote:
>> As a small step towards removing inferior_list/inferior_list_entry, this
>> patch replaces the usage of inferior_list for the list of dlls by an
>> std::list.  The dll_info type now uses an std::string for name and has a
>> simple constructor.
>>
>> I am able to build gdbserver with mingw on Linux, but I am not able to
>> test this on a Windows machine (the only platform that uses this code).
>>
> 
> Thanks for the update.  This version is fine with me.
> 
>>  
>> @@ -76,16 +40,20 @@ loaded_dll (const char *name, CORE_ADDR base_addr)
>>  void
>>  unloaded_dll (const char *name, CORE_ADDR base_addr)
>>  {
>> -  struct dll_info *dll;
>> -  struct dll_info key_dll;
>> +  auto pred = [&] (const dll_info &dll) {
> 
> FWIW, I've been formatting lambdas like this:
> 
>      auto pred = [&] (const dll_info &dll)
>        {
>          if (base_addr != UNSPECIFIED_CORE_ADDR
> 
>      for_each (..., [&] (const dll_info &dll)
>        {
>          if (base_addr != UNSPECIFIED_CORE_ADDR
> 
> The latter models on:
> 
>      if (foo)
>        {
>          if (base_addr != UNSPECIFIED_CORE_ADDR
> 
> The former I think from the latter, and because that's
> what emacs+tab wants.

Ok, thanks for the tip.  I'll change that in my local branch.

Simon



  reply	other threads:[~2017-10-09 15:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-09 14:30 [PATCH 0/3] Get rid of inferior_list Simon Marchi
2017-10-09 14:30 ` [PATCH 1/3] gdbserver: Use std::list for all_dlls Simon Marchi
2017-10-09 14:44   ` Pedro Alves
2017-10-09 14:49     ` Simon Marchi
2017-10-09 15:12     ` [PATCH v2] " Simon Marchi
2017-10-09 15:33       ` Pedro Alves
2017-10-09 15:46         ` Simon Marchi [this message]
2017-10-09 14:30 ` [PATCH 2/3] gdbserver: Use std::list for all_processes Simon Marchi
2017-10-09 14:30 ` [PATCH 3/3] gdbserver: use std::list for all_threads Simon Marchi
2017-10-14 13:12 ` [PATCH 0/3] Get rid of inferior_list Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e815115e-1f09-5d83-d173-4aceef786079@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox