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 8/9] Avoid undefined behavior in expression dumping


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

Pedro> Could you include before/after example output?

It'll be in the next revision.

>> const char *
>> op_name (struct expression *exp, enum exp_opcode opcode)
>> {
>> +  if (opcode >= OP_UNUSED_LAST)
>> +    {
>> +      char *cell = get_print_cell ();
>> +      xsnprintf (cell, PRINT_CELL_SIZE, "unknown opcode: %d", int (opcode));

Pedro> If the underlying type is unsigned, what is the rationale for
Pedro> printing it as signed?

Thinko.

Tom


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