Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4123)

Issue 535002: Use stdint types everywhere. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by Ted Mielczarek
Modified:
11 years, 1 month ago
Reviewers:
Mark Mentovai, ted
CC:
google-breakpad-dev_googlegroups.com
Visibility:
Public.

Description

It's always sort of bothered me that we use the nonstandard u_intN_t types
from sys/types.h in Breakpad. Visual C++ 2010 ships a stdint.h, so it seems
reasonable to switch to just using stdint types everywhere. This patch is
mostly mechanically generated, using:
find ./src -name "*.cc" -o -name "*.h" | xargs perl -pi -e 's/u_int/uint/g'

The only manual changes were in:
breakpad_types.h,
src/processor/minidump.cc
src/processor/static_map_iterator.h
src/processor/simple_serializer.h
src/processor/disassembler_x86.h
src/client/windows/crash_generation/minidump_generator.h

I preserved the existing typedefs for pre-MSVC2010, and also added a
preprocessor define, BREAKPAD_CUSTOM_STDINT_H, for consumers using
pre-MSVC2010 who already have a stdint.h solution. Mozilla has one
in-tree since we haven't dropped support for older MSVC versions yet.

I built and ran the tests on Linux/x86-64, Windows, and Mac.

Patch Set 1 #

Total comments: 12

Patch Set 2 : Updated patch #

Patch Set 3 : Renamed uint128_t to uint128_struct #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/client/linux/crash_generation/crash_generation_server.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/client/linux/handler/exception_handler.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/client/linux/handler/exception_handler.h View 1 chunk +1 line, -1 line 0 comments Download
M src/client/linux/handler/exception_handler_unittest.cc View 10 chunks +21 lines, -21 lines 0 comments Download
M src/client/linux/minidump_writer/minidump_writer.cc View 5 chunks +9 lines, -9 lines 0 comments Download
M src/client/linux/minidump_writer/minidump_writer.h View 1 chunk +1 line, -1 line 0 comments Download
M src/client/linux/minidump_writer/minidump_writer_unittest.cc View 4 chunks +7 lines, -7 lines 0 comments Download
M src/client/mac/handler/minidump_generator.cc View 10 chunks +19 lines, -19 lines 0 comments Download
M src/client/mac/handler/minidump_generator.h View 2 chunks +6 lines, -6 lines 0 comments Download
M src/client/mac/tests/crash_generation_server_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/client/mac/tests/exception_handler_test.cc View 6 chunks +13 lines, -13 lines 0 comments Download
M src/client/mac/tests/minidump_generator_test.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/client/mac/tests/spawn_child_process.h View 1 chunk +1 line, -1 line 0 comments Download
M src/client/minidump_file_writer.cc View 3 chunks +9 lines, -9 lines 0 comments Download
M src/client/minidump_file_writer.h View 1 chunk +1 line, -1 line 0 comments Download
M src/client/solaris/handler/minidump_generator.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/client/windows/crash_generation/minidump_generator.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/client/windows/unittests/exception_handler_death_test.cc View 5 chunks +12 lines, -12 lines 0 comments Download
M src/client/windows/unittests/exception_handler_test.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M src/common/dwarf/cfi_assembler.cc View 4 chunks +11 lines, -11 lines 0 comments Download
M src/common/dwarf/cfi_assembler.h View 5 chunks +22 lines, -22 lines 0 comments Download
M src/common/dwarf/dwarf2reader_cfi_unittest.cc View 1 chunk +4 lines, -4 lines 0 comments Download
M src/common/dwarf/dwarf2reader_die_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/common/dwarf/dwarf2reader_test_common.h View 1 chunk +1 line, -1 line 0 comments Download
M src/common/linux/guid_creator.cc View 1 chunk +8 lines, -8 lines 0 comments Download
M src/common/linux/memory_mapped_file.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/common/mac/MachIPC.h View 1 2 chunks +4 lines, -4 lines 0 comments Download
M src/common/memory_range.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/common/memory_range_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/common/module.h View 1 chunk +1 line, -1 line 0 comments Download
M src/common/solaris/dump_symbols.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/common/solaris/guid_creator.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M src/common/stabs_reader_unittest.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/common/string_conversion.cc View 2 chunks +18 lines, -18 lines 0 comments Download
M src/common/string_conversion.h View 1 chunk +5 lines, -5 lines 0 comments Download
M src/common/test_assembler.cc View 7 chunks +25 lines, -25 lines 0 comments Download
M src/common/test_assembler.h View 6 chunks +26 lines, -26 lines 0 comments Download
M src/common/test_assembler_unittest.cc View 6 chunks +37 lines, -37 lines 0 comments Download
M src/google_breakpad/common/breakpad_types.h View 1 2 1 chunk +19 lines, -17 lines 0 comments Download
M src/google_breakpad/common/minidump_cpu_amd64.h View 1 2 1 chunk +82 lines, -82 lines 0 comments Download
M src/google_breakpad/common/minidump_cpu_arm.h View 1 1 chunk +7 lines, -7 lines 0 comments Download
M src/google_breakpad/common/minidump_cpu_ppc.h View 1 2 2 chunks +19 lines, -19 lines 2 comments Download
M src/google_breakpad/common/minidump_cpu_ppc64.h View 1 1 chunk +9 lines, -9 lines 0 comments Download
M src/google_breakpad/common/minidump_cpu_sparc.h View 1 1 chunk +12 lines, -12 lines 0 comments Download
M src/google_breakpad/common/minidump_cpu_x86.h View 1 chunk +33 lines, -33 lines 0 comments Download
M src/google_breakpad/common/minidump_format.h View 1 11 chunks +123 lines, -123 lines 0 comments Download
M src/google_breakpad/processor/code_module.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/google_breakpad/processor/code_modules.h View 1 chunk +1 line, -1 line 0 comments Download
M src/google_breakpad/processor/exploitability.h View 1 chunk +1 line, -1 line 0 comments Download
M src/google_breakpad/processor/memory_region.h View 1 1 chunk +6 lines, -6 lines 0 comments Download
M src/google_breakpad/processor/minidump.h View 17 chunks +88 lines, -88 lines 0 comments Download
M src/google_breakpad/processor/minidump_processor.h View 1 chunk +1 line, -1 line 0 comments Download
M src/google_breakpad/processor/process_state.h View 1 chunk +4 lines, -4 lines 0 comments Download
M src/google_breakpad/processor/source_line_resolver_interface.h View 1 chunk +1 line, -1 line 0 comments Download
M src/google_breakpad/processor/stack_frame.h View 2 chunks +4 lines, -4 lines 0 comments Download
M src/google_breakpad/processor/stack_frame_cpu.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/google_breakpad/processor/stackwalker.h View 3 chunks +4 lines, -4 lines 0 comments Download
M src/processor/basic_code_module.h View 2 chunks +5 lines, -5 lines 0 comments Download
M src/processor/basic_code_modules.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/processor/basic_code_modules.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/processor/basic_source_line_resolver.cc View 1 3 chunks +6 lines, -6 lines 0 comments Download
M src/processor/basic_source_line_resolver_unittest.cc View 3 chunks +21 lines, -21 lines 0 comments Download
M src/processor/binarystream.cc View 1 chunk +17 lines, -17 lines 0 comments Download
M src/processor/binarystream.h View 1 chunk +8 lines, -8 lines 0 comments Download
M src/processor/binarystream_unittest.cc View 9 chunks +37 lines, -37 lines 0 comments Download
M src/processor/cfi_frame_info.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M src/processor/cfi_frame_info.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/processor/cfi_frame_info_unittest.cc View 5 chunks +34 lines, -34 lines 0 comments Download
M src/processor/disassembler_x86.cc View 2 chunks +5 lines, -5 lines 0 comments Download
M src/processor/disassembler_x86.h View 3 chunks +10 lines, -9 lines 0 comments Download
M src/processor/exploitability.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/processor/exploitability_win.cc View 3 chunks +11 lines, -11 lines 0 comments Download
M src/processor/fast_source_line_resolver.cc View 2 chunks +8 lines, -8 lines 0 comments Download
M src/processor/fast_source_line_resolver_unittest.cc View 3 chunks +21 lines, -21 lines 0 comments Download
M src/processor/logging.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/processor/logging.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/processor/map_serializers-inl.h View 6 chunks +19 lines, -19 lines 0 comments Download
M src/processor/map_serializers_unittest.cc View 12 chunks +16 lines, -16 lines 0 comments Download
M src/processor/minidump.cc View 1 2 60 chunks +134 lines, -132 lines 0 comments Download
M src/processor/minidump_dump.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M src/processor/minidump_processor.cc View 3 chunks +6 lines, -6 lines 0 comments Download
M src/processor/minidump_processor_unittest.cc View 2 chunks +9 lines, -9 lines 0 comments Download
M src/processor/minidump_stackwalk.cc View 5 chunks +8 lines, -8 lines 0 comments Download
M src/processor/minidump_unittest.cc View 18 chunks +37 lines, -37 lines 0 comments Download
M src/processor/module_serializer.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/processor/module_serializer.h View 1 chunk +1 line, -1 line 0 comments Download
M src/processor/postfix_evaluator_unittest.cc View 1 chunk +6 lines, -6 lines 0 comments Download
M src/processor/simple_serializer-inl.h View 1 chunk +12 lines, -12 lines 0 comments Download
M src/processor/simple_serializer.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/processor/stackwalker.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M src/processor/stackwalker_amd64.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M src/processor/stackwalker_amd64.h View 1 chunk +1 line, -1 line 0 comments Download
M src/processor/stackwalker_amd64_unittest.cc View 4 chunks +6 lines, -6 lines 0 comments Download
M src/processor/stackwalker_arm.cc View 5 chunks +11 lines, -11 lines 0 comments Download
M src/processor/stackwalker_arm_unittest.cc View 6 chunks +11 lines, -11 lines 0 comments Download
M src/processor/stackwalker_ppc.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/processor/stackwalker_selftest.cc View 5 chunks +38 lines, -38 lines 0 comments Download
M src/processor/stackwalker_sparc.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M src/processor/stackwalker_unittest_utils.h View 1 chunk +15 lines, -15 lines 0 comments Download
M src/processor/stackwalker_x86.cc View 8 chunks +21 lines, -21 lines 0 comments Download
M src/processor/stackwalker_x86.h View 1 chunk +1 line, -1 line 0 comments Download
M src/processor/stackwalker_x86_unittest.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/processor/static_contained_range_map-inl.h View 1 chunk +1 line, -1 line 0 comments Download
M src/processor/static_contained_range_map.h View 1 chunk +1 line, -1 line 0 comments Download
M src/processor/static_map-inl.h View 2 chunks +5 lines, -5 lines 0 comments Download
M src/processor/static_map.h View 1 chunk +1 line, -1 line 0 comments Download
M src/processor/static_map_iterator-inl.h View 1 chunk +1 line, -1 line 0 comments Download
M src/processor/static_map_iterator.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/processor/static_map_unittest.cc View 3 chunks +17 lines, -17 lines 0 comments Download
M src/processor/synth_minidump.cc View 2 chunks +14 lines, -14 lines 0 comments Download
M src/processor/synth_minidump.h View 4 chunks +21 lines, -21 lines 0 comments Download
M src/processor/synth_minidump_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M src/processor/synth_minidump_unittest_data.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/processor/windows_frame_info.h View 1 3 chunks +21 lines, -21 lines 1 comment Download
M src/tools/linux/md2core/minidump-2-core.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/tools/linux/md2core/minidump_memory_range.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/tools/linux/md2core/minidump_memory_range_unittest.cc View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 9
Ted Mielczarek
11 years, 1 month ago #1
Mark Mentovai
Thanks for fixing the u_ error. http://breakpad.appspot.com/535002/diff/1/src/common/mac/MachIPC.h File src/common/mac/MachIPC.h (right): http://breakpad.appspot.com/535002/diff/1/src/common/mac/MachIPC.h#newcode213 src/common/mac/MachIPC.h:213: uint8_t data[1]; // ...
11 years, 1 month ago #2
Ted Mielczarek
Sorry about the alignment screwup, I somehow failed to consider that when patching this. On ...
11 years, 1 month ago #3
Ted Mielczarek
11 years, 1 month ago #4
Mark Mentovai
ted.mielczarek@gmail.com wrote: > Agreed, I thought about that while patching this. Do you have a ...
11 years, 1 month ago #5
ted_mielczarek.org
On 3/5/2013 11:39 AM, Mark Mentovai wrote: > ted.mielczarek@gmail.com <mailto:ted.mielczarek@gmail.com> wrote: > > Agreed, I ...
11 years, 1 month ago #6
Ted Mielczarek
11 years, 1 month ago #7
Ted Mielczarek
https://breakpad.appspot.com/535002/diff/18001/src/google_breakpad/common/minidump_cpu_ppc.h File src/google_breakpad/common/minidump_cpu_ppc.h (right): https://breakpad.appspot.com/535002/diff/18001/src/google_breakpad/common/minidump_cpu_ppc.h#newcode100 src/google_breakpad/common/minidump_cpu_ppc.h:100: uint32_t save_vrvalid; /* Identifies which vector registers are saved*/ ...
11 years, 1 month ago #8
Mark Mentovai
11 years, 1 month ago #9
LGTM

https://breakpad.appspot.com/535002/diff/18001/src/google_breakpad/common/min...
File src/google_breakpad/common/minidump_cpu_ppc.h (right):

https://breakpad.appspot.com/535002/diff/18001/src/google_breakpad/common/min...
src/google_breakpad/common/minidump_cpu_ppc.h:100: uint32_t       save_vrvalid; 
/* Identifies which vector registers are saved*/
Ted Mielczarek wrote:
> I know the lack of a trailing space here probably drives you nuts, but I
didn't
> want to spill onto a second line just to get that space in there. If it keeps
> you up at night I'll fix it. :)

So pick a shorter way of saying it, like “indicates” instead of “identifies.”

https://breakpad.appspot.com/535002/diff/18001/src/processor/windows_frame_in...
File src/processor/windows_frame_info.h (right):

https://breakpad.appspot.com/535002/diff/18001/src/processor/windows_frame_in...
src/processor/windows_frame_info.h:134: uint32_t saved_register_size  = 
strtoul(tokens[6],  NULL, 16);
You’ve got one more space on the left side of the = than you need in this
section.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted