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]

[RFC 0/3] New var_types var_zuinteger_unlimited


On Friday, July 27, 2012 01:40:06 PM Khoo Yit Phang wrote:
> >        else if (val >= INT_MAX)
> >          error (_("integer %u out of range"), val);
> 
> I tried changing val to LONGEST, but that subsequently broke the "set
> listsize -1" test in the testsuite (or at least, it fails one of the test
> cases in testsuite/gdb.base/list.exp).
> 
> Actually, it's not clear to me what "set listsize -1" is supposed to do: in
> one place in the testsuite, it's supposed to be unlimited and "set listsize
> 0" is supposed to suppress printing, but in another place, "set listsize 0"
> is supposed to be unlimited. But running "set listsize -1", without my
> change, also leads to an error ("integer 4294967295 out of range"). The
> documentation does not make it clear either.

When looking at the issue of 'set listsize -1', I found the following
patch and the discussion,

  [RFC] Clean up var_integer/var_uinteger/var_zinteger mess
  http://sourceware.org/ml/gdb-patches/2006-01/msg00488.html

I don't know why this patch wasn't committed, but this patch looks
good to me.  I pick up part of it but adding a new var_types
'var_zuinteger_unlimited', because command 'set listsize' requires
both 0 and unlimited (-1), which doesn't map to any enum var_types
so far.  After I examined the usage of command registrations in GDB,
I find there are more places (patch 2/3 and 3/3) require both 0 and
unlimited, so I decide to add 'var_zuinteger_unlimited'.  Comments are
appreciated.

Regression tested on x86_64-linux for patch 1/3 and 2/3.  Rebuild GDB with
--enable-targets=all for patch 3/3.


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