Bug 138564 - [GTK] fix up the GDB backtrace report tool
Summary: [GTK] fix up the GDB backtrace report tool
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-10 05:12 PST by Philippe Normand
Modified: 2014-11-11 01:05 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.17 KB, patch)
2014-11-10 05:22 PST, Philippe Normand
cgarcia: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2014-11-10 05:12:57 PST
See also Bug 128928 but for now I'll only restore the basic functionality without making too many changes.
Comment 1 Philippe Normand 2014-11-10 05:22:41 PST
Created attachment 241286 [details]
Patch
Comment 2 Carlos Garcia Campos 2014-11-11 00:53:21 PST
Comment on attachment 241286 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=241286&action=review

LGTM

> Tools/Scripts/webkitpy/port/linux_get_crash_log.py:44
> -        cmd = ['gdb', '-ex', 'thread apply all bt 1024', '--batch', str(self._path_to_driver()), coredump_path]
> +        process_name = os.path.join(os.path.dirname(str(self._path_to_driver())), self.name)
> +        cmd = ['gdb', '-ex', 'thread apply all bt 1024', '--batch', process_name, coredump_path]

why do you need str()? the path to driver should be a str already, otherwise it would be None, but in that case gdb will fail anyway. Wouldn't it be easier to pass bin_dir directly to GDBCrashLogGenerator instead of passing the driver only path to get its dirname?
Comment 3 Philippe Normand 2014-11-11 01:02:44 PST
Committed r175867: <http://trac.webkit.org/changeset/175867>
Comment 4 Philippe Normand 2014-11-11 01:05:58 PST
(In reply to comment #2)
> Comment on attachment 241286 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=241286&action=review
> 
> LGTM
> 
> > Tools/Scripts/webkitpy/port/linux_get_crash_log.py:44
> > -        cmd = ['gdb', '-ex', 'thread apply all bt 1024', '--batch', str(self._path_to_driver()), coredump_path]
> > +        process_name = os.path.join(os.path.dirname(str(self._path_to_driver())), self.name)
> > +        cmd = ['gdb', '-ex', 'thread apply all bt 1024', '--batch', process_name, coredump_path]
> 
> why do you need str()? the path to driver should be a str already, otherwise
> it would be None, but in that case gdb will fail anyway. Wouldn't it be
> easier to pass bin_dir directly to GDBCrashLogGenerator instead of passing
> the driver only path to get its dirname?

Might be for unit-tests purposes. Anyway I didn't want to make too many changes in this patch, perhaps this could be fixed along in bug 128928.