This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 0/3] More cleanup elimination / gdb::unique_ptr


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> But I'll be happy to drop my patch instead if you'd prefer.

No, please keep it.

>> but note mine deletes the do_cleanups, which you don't want to do.

Pedro> Looks like the last cleanup is this one:
Pedro>       name = xstrdup (TYPE_FIELD_NAME (type, 0));
Pedro>       cleanup = make_cleanup (xfree, name);
Pedro>       tail = name + strlen (RUST_ENUM_PREFIX);
Pedro> and, I can't figure out why we need to xstrdup at all here?

The string is modified using strtok_r below.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]