[v2,0/6] More linespec cleanups and C++-ification

Message ID 20250110-linespec-state-cxx-v2-0-a17144fa5c36@tromey.com
Headers
Series More linespec cleanups and C++-ification |

Message

Tom Tromey Jan. 10, 2025, 9:29 p.m. UTC
  This short series applies a bit more C++-ification to linespec.c.
I also made some smaller cleanups while working here.

Regression tested on x86-64 Fedora 40.

Signed-off-by: Tom Tromey <tom@tromey.com>
---
Changes in v2:
- Addressed review comments
- Link to v1: https://inbox.sourceware.org/gdb-patches/20250108-linespec-state-cxx-v1-0-a721e95ee050@tromey.com

---
Tom Tromey (6):
      Add constructor and destructor to linespec_state
      Use gdb::unordered_set in linespec_state
      Use std::vector in linespec_state
      Minor cleanup in linespec.c:add_minsym
      Hoist lambda in linespec.c:add_matching_symbols_to_info
      Use bool in linespec

 gdb/linespec.c | 256 ++++++++++++++++++++-------------------------------------
 1 file changed, 90 insertions(+), 166 deletions(-)
---
base-commit: 308d7670f038de523d5ecbb06e05446a798c36dc
change-id: 20250108-linespec-state-cxx-17081ec0647b

Best regards,
  

Comments

Simon Marchi Jan. 11, 2025, 4:50 a.m. UTC | #1
On 2025-01-10 16:29, Tom Tromey wrote:
> This short series applies a bit more C++-ification to linespec.c.
> I also made some smaller cleanups while working here.
> 
> Regression tested on x86-64 Fedora 40.
> 
> Signed-off-by: Tom Tromey <tom@tromey.com>
> ---
> Changes in v2:
> - Addressed review comments
> - Link to v1: https://inbox.sourceware.org/gdb-patches/20250108-linespec-state-cxx-v1-0-a721e95ee050@tromey.com
> 
> ---
> Tom Tromey (6):
>       Add constructor and destructor to linespec_state
>       Use gdb::unordered_set in linespec_state
>       Use std::vector in linespec_state
>       Minor cleanup in linespec.c:add_minsym
>       Hoist lambda in linespec.c:add_matching_symbols_to_info
>       Use bool in linespec
> 
>  gdb/linespec.c | 256 ++++++++++++++++++++-------------------------------------
>  1 file changed, 90 insertions(+), 166 deletions(-)
> ---
> base-commit: 308d7670f038de523d5ecbb06e05446a798c36dc
> change-id: 20250108-linespec-state-cxx-17081ec0647b
> 
> Best regards,

Thanks for the update.  I just checked patch #2 as the rest already has
my Approved-By.

Simon