13 Commits

Author SHA1 Message Date
Mark Mentovai
332e8219ed Migrate content from wiki.
The wiki existed at https://code.google.com/p/crashpad/wiki, but given
Google Code Project Hosting’s impending shutdown[1], it’s prudent to
move wiki documents into the source code repository.

This change moves the existing contents of doc into doc/support, to make
way for documentation in doc. The two existing wiki pages, ProjectStatus
and DevelopingCrashpad, are converted to AsciiDoc format (a fairly
straightforward conversion) and checked in to doc. generate_asciidoc.sh
is updated to produce HTML output from these files. The generated HTML
will show up at http://docs.crashpad.googlecode.com/git/doc/. Note that
generated HTML is still hosted on Google Code Project Hosting, but it’ll
be easy to find a new home for them.

[1]
http://google-opensource.blogspot.com/2015/03/farewell-to-google-code.html

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1055523002
2015-04-01 12:39:53 -04:00
Mark Mentovai
352160906b Add ExcServerCopyState().
ExcServerCopyState() properly sets the new_state and new_state_count
out-parameters for exception handler routines that may deal with
state-carrying exceptions.

This used to exist inline in catch_exception_tool, but that
implementation had a bug caught by the new test.

TEST=crashpad_util_test ExcServerVariants.ExcServerCopyState and others
R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1049023003
2015-04-01 12:16:22 -04:00
Mark Mentovai
d5ddd14ee1 Improve map insertion operations.
Add MapInsertOrReplace<>() to insert a key-value pair into a map if the
key is not already present, or replace the existing value for key if the
key is present. The original value can optionally be returned to the
caller in this case.

Map insertions now use either MapInsertOrReplace<>() or
std::map<>::insert() directly.

Use MapInsertOrReplace<>() when the map should be updated to contain a
mapping from a key to a value regardless of whether the key is already
present.

Use std::map<>::insert() to insert a mapping from a key to a value
without replacing any existing mapping from a key, if present. If it is
important to know whether an existing mapping from a key was present,
use the returned std::pair<>.second. If it is important to know the
existing value, use the returned std::pair<>.first->second.

This change has a slight positive impact on performance.

TEST=crashpad_util_test MapInsert.MapInsertOrReplace and others
BUG=
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/1044273002
2015-03-31 14:29:32 -04:00
Mark Mentovai
6f4e6aacc8 Add crashpad_database_util and its man page.
R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1022663002
2015-03-19 18:41:01 -04:00
Mark Mentovai
af9e78940e Allow man pages to link to each other
R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1018023002
2015-03-18 17:13:22 -04:00
Mark Mentovai
c2502f45c9 doc: Add documentation-generating scripts to the Crashpad tree.
R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1009223003
2015-03-18 17:10:12 -04:00
Mark Mentovai
82bebb11de Update man pages.
R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1013783002
2015-03-16 13:47:51 -04:00
Mark Mentovai
29cdc74579 CrashpadClient::StartHandler(): accept database, url, and annotations arguments.
This makes it easier for clients to start the Crashpad handler, instead
of requiring them to know how to construct arguments for the handler
themselves. Note in the TEST that -a is no longer required.

TEST=run_with_crashpad --handler crashpad_handler \
         --database=/tmp/crashpad_db \
         --url=https://clients2.google.com/cr/staging_report \
         --annotation=prod=crashpad \
         --annotation=ver=0.7.0 \
         crashy_program

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/1001993002
2015-03-12 14:28:19 -04:00
Mark Mentovai
a829f67f81 Don’t const_cast<char*> the service name parameter to
bootstrap_look_up().

This hasn’t been required since the 10.5 SDK, which is no longer
supported.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/999533002
2015-03-10 17:01:12 -04:00
Mark Mentovai
3ee6566051 generate_dump, exception_port_tool: set SecTaskAccess allowed.
This adds an Info.plist to these two tools that use task_for_pid().
Since they’re flat unbundled executables, the Info.plist must be placed
as a __TEXT,__info_plist section.

By setting SecTaskAccess to allowed and signing these tools with a
certificate trusted by the system, they will be allowed to use
task_for_pid() without requiring the invoking user to be root. This
provides an alternative to installing these tools as setuid root.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/822533002
2014-12-30 14:27:58 -05:00
Mark Mentovai
f4ec7ba590 Add the run_with_crashpad tool.
run_with_crashpad runs a program with a Crashpad exception handler. It
allows a Crashpad exception-handling server to be started and to direct
crashes to it from programs that are not themselves clients of the
Crashpad client library.

R=rsesek@chromium.org

Review URL: https://codereview.chromium.org/810423004
2014-12-30 14:25:58 -05:00
Mark Mentovai
b0e8f3e3e4 tools: Restore Resources, Copyright, and License to man pages.
This updates moved man pages to reference man_footer.ad by a proper
relative path following 39f69c862af6.

R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/820803003
2014-12-19 18:44:35 -05:00
Mark Mentovai
39f69c862a tools: Move Mac-specific tools to tools/mac.
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/804913003
2014-12-17 15:26:23 -05:00