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, doc RFA] Fix lazy string type docs


On 04/11/16 17:52, Doug Evans wrote:
> On Thu, Nov 3, 2016 at 5:00 PM, Doug Evans <dje@google.com> wrote:
>> On Thu, Nov 3, 2016 at 12:03 PM, Doug Evans <dje@google.com> wrote:
>>> On Thu, Nov 3, 2016 at 10:46 AM, Doug Evans <dje@google.com> wrote:
>>>> Hi.
>>>>

>>>
>>> (gdb) py print gdb.parse_and_eval("foo").lazy_string().type
>>> const char
>>> (gdb) py print gdb.parse_and_eval("bar").lazy_string().type
>>> const char [19]
>>>
>>> I don't have a strong opinion on what the correct answer is, but there
>>> is certainly a bug here.
>>>
>>> Phil, do you remember why this code exists in valpy_lazy_string():
>>>
>>>       if (TYPE_CODE (value_type (value)) == TYPE_CODE_PTR)
>>>         value = value_ind (value);
>>>
>>> [lazy string support went in in commit be759fcf]

I can't remember. Too many sleeps ;) It's possible it is just a
mistake and we're worrying about a bug that should just be fixed.

I think lazy strings were implemented to carry around a string that
remains unfetched (in cases of massive strings) until actually needed,
or a pointer to that string. I also thought there was some work
carried out on them by Tom (?) after the initial commit.

I keep notes and I'll look on the weekend to see of I can dig out
specific implementation details.

Cheers

Phil


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