Skip to content

Commit

Permalink
Backed out changeset df0d6b993ad6 (bug 1642121) for causing build bus…
Browse files Browse the repository at this point in the history
…tages
  • Loading branch information
nerli1 committed Jun 15, 2020
1 parent 7fc47d9 commit e73a8db
Show file tree
Hide file tree
Showing 13 changed files with 56 additions and 111 deletions.
4 changes: 0 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,3 @@ per-file-ignores =
testing/mochitest/**: F821
testing/xpcshell/**: F633, F821
xpcom/idl-parser/xpidl/**: F633, F821

builtins =
# For GDB extensions
gdb
14 changes: 9 additions & 5 deletions build/.gdbinit → .gdbinit
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# .gdbinit file for debugging Mozilla

# This file is loaded by .gdbinit
# You may need to put an 'add-auto-load-safe-path' command in your
# $HOME/.gdbinit file to get GDB to trust this file. If your builds are
# generally in $HOME/moz, then you can say:
#
# add-auto-load-safe-path ~/moz

# Don't stop for the SIG32/33/etc signals that Flash produces
handle SIG32 noprint nostop pass
Expand Down Expand Up @@ -169,7 +171,7 @@ end

document ptarray
Prints nsTArray information.
Syntax: ptarray
Syntax: ptarray
Note: idx, idx1 and idx2 must be in acceptable range [0...size()-1].
Examples:
ptarray a - Prints tarray content, size, capacity and T typedef
Expand All @@ -196,3 +198,5 @@ end
define ftlp
call $arg0->DumpFrameTreeLimitedInCSSPixels()
end

source .gdbinit_python
5 changes: 5 additions & 0 deletions .gdbinit_python
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
python
import sys
sys.path.append('python/gdbpp/')
import gdbpp
end
24 changes: 0 additions & 24 deletions build/.gdbinit.loader

This file was deleted.

6 changes: 6 additions & 0 deletions build/.gdbinit_python.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#filter substitution
python
import sys
sys.path.append('@topsrcdir@/python/gdbpp')
import gdbpp
end
13 changes: 8 additions & 5 deletions build/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ if CONFIG['ENABLE_TESTS'] or CONFIG['MOZ_DMD']:
if CONFIG['MOZ_DMD']:
FINAL_TARGET_FILES += ['/memory/replace/dmd/dmd.py']

# Put a useful .gdbinit and .gdbinit.py in $objdir/build, to be picked up
# automatically by GDB via either libxul.so-gdb.py or js-gdb.py.
OBJDIR_PP_FILES.build += ['.gdbinit.py.in']
OBJDIR_FILES.build += ['.gdbinit.loader']
OBJDIR_FILES.build += ['.gdbinit']
# Put a useful .gdbinit in the bin directory, to be picked up automatically
# by GDB when we debug executables there.
FINAL_TARGET_FILES += ['/.gdbinit']
FINAL_TARGET_PP_FILES += ['.gdbinit_python.in']
OBJDIR_FILES += ['!/dist/bin/.gdbinit_python']

# Install the clang-cl runtime library for ASAN next to the binaries we produce.
if CONFIG['MOZ_ASAN'] and CONFIG['CC_TYPE'] == 'clang-cl':
Expand Down Expand Up @@ -95,6 +95,9 @@ if CONFIG['MOZ_APP_BASENAME']:
GeneratedFile('application.ini.h', script='appini_header.py',
inputs=['!application.ini'])

# NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir.
OBJDIR_FILES += ['/.gdbinit']

# Put a .lldbinit in the bin directory and the objdir, to be picked up
# automatically by LLDB when we debug executables using either of those two
# directories as the current working directory. The .lldbinit file will
Expand Down
8 changes: 4 additions & 4 deletions js/src/gdb/README
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ You can still see the raw form of a value with 'print/r':
You can also use GDB's 'disable pretty-printer' command to turn off
individual pretty-printers; try 'info pretty-printer' first.

GDB should pick these extensions up automatically when you debug the shell or
the browser, by auto-loading the 'js-gdb.py' file that the build system
installs alongside the 'js' executable (or 'libxul.so-gdb.py' for the browser).
You may need to add a command like the following to your '$HOME/.gdbinit' file:
GDB should pick these extensions up automatically when you debug the shell, by
auto-loading the 'js-gdb.py' file that js/src/shell/Makefile.in places in the
same directory as the 'js' executable. You may need to add a command like the
following to your '$HOME/.gdbinit' file:

# Tell GDB to trust auto-load files found under ~/moz.
add-auto-load-safe-path ~/moz
Expand Down
17 changes: 0 additions & 17 deletions js/src/shell/js-gdb.py

This file was deleted.

11 changes: 11 additions & 0 deletions js/src/shell/js-gdb.py.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
""" GDB Python customization auto-loader for js shell """
#filter substitution

import os.path
sys.path[0:0] = [os.path.join('@topsrcdir@', 'gdb')]

import mozilla.autoload
mozilla.autoload.register(gdb.current_objfile())

import mozilla.asmjs
mozilla.asmjs.install()
12 changes: 2 additions & 10 deletions js/src/shell/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,10 @@ LOCAL_INCLUDES += [

OS_LIBS += CONFIG['EDITLINE_LIBS']

# Prepare module loader JS code for embedding
GeneratedFile('shellmoduleloader.out.h', 'shellmoduleloader.js',
script='../builtin/embedjs.py',
entry_point='generate_shellmoduleloader',
inputs=[
'../js.msg',
'ModuleLoader.js',
])

# Place a GDB Python auto-load file next to the shell executable, both in
# the build directory and in the dist/bin directory.
FINAL_TARGET_FILES += ['js-gdb.py']
DEFINES['topsrcdir'] = '%s/js/src' % TOPSRCDIR
FINAL_TARGET_PP_FILES += ['js-gdb.py.in']
OBJDIR_FILES.js.src.shell += ['!/dist/bin/js-gdb.py']

# People expect the js shell to wind up in the top-level JS dir.
Expand Down
40 changes: 0 additions & 40 deletions toolkit/library/libxul.so-gdb.py

This file was deleted.

8 changes: 8 additions & 0 deletions toolkit/library/libxul.so-gdb.py.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
""" GDB Python customization auto-loader for libxul """
#filter substitution

import os.path
sys.path[0:0] = [os.path.join('@topsrcdir@', 'js', 'src', 'gdb')]

import mozilla.autoload
mozilla.autoload.register(gdb.current_objfile())
5 changes: 3 additions & 2 deletions toolkit/library/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ def Libxul(name, output_category=None):

# Generate GDB pretty printer-autoload files only on Linux. OSX's GDB is
# too old to support Python pretty-printers; if this changes, we could
# make this 'ifdef __GNUC__'.
# make this 'ifdef GNU_CC'.
if CONFIG['OS_ARCH'] == 'Linux':
# Create a GDB Python auto-load file alongside the libxul shared library
# in the build directory.
DEFINES['topsrcdir'] = TOPSRCDIR
OBJDIR_FILES.toolkit.library.build += ['../libxul.so-gdb.py']
OBJDIR_PP_FILES.toolkit.library.gtest += ['../libxul.so-gdb.py.in']


# The real libxul definition is in ./build/moz.build, but we define a
Expand Down Expand Up @@ -372,3 +372,4 @@ else:
CONFIG['DLL_PREFIX'], CONFIG['DLL_SUFFIX'].lstrip('.').replace('.','_'))
GeneratedFile('buildid.cpp', script = 'gen_buildid.py',
inputs=['!build/%s.list' % libxul_list])

0 comments on commit e73a8db

Please sign in to comment.