Commit Graph

55623 Commits

Author SHA1 Message Date
Rene Gollent
5c8966c740 Debugger: Fix crash regression.
- During the TargetHostInterface refactoring, a parameter was accidentally
  omitted for the debugger options in the command line and report interfaces,
  leading to a crash during TeamDebugger init.
2016-04-26 22:34:00 -04:00
Rene Gollent
bac2e686dc Debugger: Add core file request to DebuggerInterface.
{CoreFile,Local}DebuggerInterface:
- Add virtual hook for requesting a core dump of the current team. Implement
  accordingly in LocalDebuggerInterface, and add a no-op stub in
  CoreFileDebuggerInterface.
2016-04-26 21:48:44 -04:00
Ingo Weinhold
42f9500235 Debugger: CoreFile: read symbol and string table addresses 2016-04-27 02:17:15 +02:00
Ingo Weinhold
5cde7a856d Add symbol and string table addresses to core file 2016-04-27 02:16:54 +02:00
Ingo Weinhold
8c6cb8af01 runtime loader: Register extended image info with kernel
Add structure extended_image_info which extends image_info by the
fields symbol_table, symbol_hash, string_table.
2016-04-27 02:16:09 +02:00
Ingo Weinhold
82185a52e2 Future proofing core file format
* The Haiku specific notes contain a structure size field, now.
* Change the type of the count and size fields in the Haiku specific
  notes to uint32 also for 64 bit ELF. The size field for a note is a
  uint32 anyway.
2016-04-27 00:55:23 +02:00
Rene Gollent
63a0065c83 Debugger: Implement part of #12729.
TeamsWindow:
- Add a button allowing one to specify loading a core file in addition
  to attaching to/creating teams.
- Slight layout tweak.
2016-04-26 18:28:09 -04:00
Ingo Weinhold
6d5951d612 Debugger: Handle RefsReceived(), opening core files 2016-04-26 23:48:41 +02:00
Ingo Weinhold
b7e6e93165 MIME type for core files
Icon wanted!
2016-04-26 23:48:04 +02:00
Rene Gollent
ef969bcb59 Debugger: Fix incorrect behavior when asking to activat.
GraphicalUserInterface:
- The Show() method now checks if the team window is already visible. If
  it is, we instead call Activate() to focus it. Fixes the problem that
  attempting to attach to a team which we already had a running team
  debugger for would appear to do nothing, rather than focusing that window.
2016-04-25 21:56:10 -04:00
Rene Gollent
61f0bf59fb Debugger: Fix handling of team_id clashes.
TeamDebugger:
- Add accessor to query whether the debugger's interface is a post mortem core
  rather than a live team.

TargetHostInterface:
- When asked to locate a team debugger by team_id, as is done for attach
  requests to determine if we already have an existing instance attached, skip
  over post mortems. This takes care of the potential problem of detecting a
  core instance with the same team_id as a live team, and consequently refusing
  the attach request.
- When a team debugger quits, use its actual pointer to look it up rather than its
  team ID, as we could otherwise potentially remove the wrong one in the case of a
  clash.
2016-04-25 21:49:46 -04:00
Rene Gollent
2c4195e840 Debugger: Integrate core handling into TargetHostInterface.
{Local}TargetHostInterface:
- Add virtual method for requesting a debugger interface for a core file.
  Implement accordingly in LocalTargetHostInterface based on Ingo's
  previous implementation in the Debugger app.

TeamDebuggerOptions:
- Add an enum to define the type of team debugger request being made
  to explicitly make this clear rather than guessing based on the provided
  arguments. Set accordingly in the various cases.
- Add a parameter for the core file path.

Debugger:
- Refactor to fill in TeamDebuggerOptions appropriately for core file
  requests, and consequently simplify code.

This doesn't yet deal with the fact that a post-mortem team's ID can
clash with that of a live team, which may lead to issues when attempting
to attach to a live team in such a case.
2016-04-25 16:48:37 -04:00
Jérôme Duval
0cb870a56c Use libstdc++.so in place of libsupc++.so.
* The latter doesn't link against libroot.so, which lets the library init fail.
* Fix kernel_debugger crash in malloc().
* libsupc++.so will be deleted from gcc_syslibs package (the static libs will
stay however).
2016-04-25 19:09:03 +02:00
Jérôme Duval
60ac5356ac Fix debug build of libtextencoding.so. 2016-04-25 19:08:01 +02:00
Ingo Weinhold
1a899ed474 Debugger: Beginning of core file support
* DebuggerInterface: Add method IsPostMortem() to be able to
  descriminate between live and post mortem debugging.
* Add DebuggerInterface implementation CoreFileDebuggerInterface which
  provides information from a core file.
* TeamDebugger: Don't start the debug event thread when debugging post
  mortem.
* Debugger: New command line variant "Debugger --core <file path>",
  which starts a team debugger using the core file.

There are a few issues:
* I didn't see an easy way to integrate with the new
  TargetHostInterface framework and I didn't want to get into Rene's
  way changing stuff. As a side effect core file debug windows are not
  counted and Debugger will quit when only those are left, respectively
  will additionally open a teams window on start-up.
* There aren't any symbols yet. We can't use the debug kit
  functionality, since it isn't bitness/endianess agnostic. So either
  it needs to be adjusted or ported over to Debugger.
2016-04-24 18:48:37 +02:00
Ingo Weinhold
3d26e83096 Debugger: TeamInfo: Add SetTo() version
... that doesn't expect a team_info.
2016-04-24 18:35:45 +02:00
Ingo Weinhold
86fe52b6bc Debugger: Add class CoreFile
Reads data from Haiku specific core files.
2016-04-24 18:34:51 +02:00
Ingo Weinhold
05c7cd7647 Debugger: Make ElfFile more flexible
* It was previously geared towards shared object files. Now it is
  fairly agostic and also accepts e.g. files without sections and
  different endianess.
* The handling of 32 vs. 64 bit files works a bit differently now.
  There're structs ElfClass32 and ElfClass64 now which provide the
  types for the respective bitness.
* Add a few more getters.
2016-04-24 18:34:07 +02:00
Ingo Weinhold
6dc2384f6e debug server: Offer option to write a core file
... when a team crashes/hits a debug event.
2016-04-24 18:24:50 +02:00
Ingo Weinhold
467fe4ca0c kernel: Add core dump facility
* Add function core_dump_write_core_file(). It writes a core file for
  the current thread's team. The file format is similar to that of
  other OSs (i.e. ELF with PT_LOAD segments and a PT_NOTE segment), but
  most of the notes are Haiku specific (infos for team, areas, images,
  threads). More data will probably need to be added.
* Add team flag TEAM_FLAG_DUMP_CORE, thread flag
  THREAD_FLAGS_TRAP_FOR_CORE_DUMP, and Team property coreDumpCondition,
  a condition variable available while a core dump is progress. A
  thread that finds its flag THREAD_FLAGS_TRAP_FOR_CORE_DUMP set before
  exiting the kernel to userland calls core_dump_trap_thread(), which
  blocks on the condition variable until the core dump has finished. We
  need the team's threads to stop so we can get their CPU state (and
  have a generally unchanging team state while writing the core file).
* Add user debugger message B_DEBUG_WRITE_CORE_FILE. It causes
  core_dump_write_core_file() to be called for the team.
* Dumping core as an immediate effect of a terminal signal has not been
  implemented yet, but that should be fairly straight forward.
2016-04-24 18:22:14 +02:00
Ingo Weinhold
ac1f1a926e kernel: +image_iterate_through_team_images()
Like image_iterate_through_images(), but iterates though the images of
the given team only.
2016-04-24 17:30:52 +02:00
Ingo Weinhold
99f00556a4 kernel: +arch_get_thread_debug_cpu_state()
Similar to arch_get_debug_cpu_state(), but the thread whose CPU state
to retrieve is specified. Works only for threads that aren't running,
and on x86-64 we can get the FPU state only when the thread was
interrupted in userland.
Not implemented for the incomplete architecture ports.
2016-04-24 17:29:28 +02:00
Ingo Weinhold
7a187cd629 _user_debug_thread(): Use new signal SIGNAL_DEBUG_THREAD
This resolves a TODO: We used thread_interrupt() to wake up the thread
from an interruptable wait. However, if the thread was already in the
kernel and about to start waiting, that would have no effect and the
thread would wait anyway. Now there's the new non-blockable signal
SIGNAL_DEBUG_THREAD, which is sent to the thread instead, making sure
that thread doesn't start waiting.
2016-04-24 11:54:17 +02:00
Alexander von Gluck IV
3218cf3b36 ohci: Fix x86_64 usb tracing 2016-04-23 14:26:22 -05:00
Alexander von Gluck IV
78fc8fe7a0 xhci: 1.1 spec actually specifies 1023 maximum scratch pads.
* While my test XHCI machine only requested 36, the spec for 1.1
  actually states the controller can now "request up to 1023"
2016-04-23 13:03:43 -05:00
Alexander von Gluck IV
cf9e522172 xhci: 1.1 spec bumped scratchpads to 36. Set to sane 48 max 2016-04-23 12:49:10 -05:00
Alexander von Gluck IV
1b6e91d3b9 xhci: Tab cleanup of hw defines. No functional change 2016-04-23 12:47:59 -05:00
Alexander von Gluck IV
23cd7065bd intel_extreme: Disable register dumps
* Could cause instability in rare cases.
2016-04-23 09:13:23 -05:00
Alexander von Gluck IV
8d1cb54aac intel_extreme: Add in some code for the lakes (unused) 2016-04-22 22:41:52 -05:00
Alexander von Gluck IV
e54df51727 x86/kernel: Up kernel max page table to 16
* New Intel SkyLake seems to have 9 mapped ranges
  at boot.  It seems like this define has been creeping
  up for a while.
* Resolves the inital issue reported in #11377 on SkyLake
  as well. Bonefish mentioned it might need to be raised
  again... he had some good foresight there :-)
* I'm seeing the same no bootable partitions issue though
  via USB after this raise. (maybe a USB 3.1 thing?)
2016-04-22 19:05:19 -05:00
Alexander von Gluck IV
abde6a01f8 bluetooth: Re-introduce to image
* Previous enablement broke gcc2 and hybrid builds
* gcc2 builds fixed and tested working now
* Fix Hybrid builds via missing MultiArch Jam
* Sorry for the noise, enjoy early Bluetooth support
2016-04-22 14:55:55 -05:00
Alexander von Gluck IV
db706cb504 bluetooth_server: Fix fatal warning under gcc2 2016-04-22 14:48:05 -05:00
Alexander von Gluck IV
e29ff32374 bluetooth_server: Fix multi-arch build 2016-04-22 14:32:51 -05:00
Dario Casalinuovo
20802959d3 shutdown_media_server: Rely on actual instance
* Makes the shutdown process to rely on the instance that was
running at the time the function is called. While it's unlikely
anyone will see any change from that, this way we will not conflict
in any case with the launch_daemon.
* The reply could have been confused in a remote situation, make
every request to use an it's own object.
* In launch_media_server there was a wrong variable redefinition
too.
2016-04-22 15:55:15 +02:00
Dario Casalinuovo
e4704eb6f9 MediaDefs/MediaRoster: Increase code consistency
* Also fix a possible issue with List::Get, the code returned
after a Get() error. While I doubt if this happens the next
items will be still valid, I prefer to continue until we reach
the end of the items, and in case of a SyncToRoster request we will
at least get the list empty. We might have a blocking call
on the other end, so it's our own duty to at least try to avoid
this in any case. As final result at least we will get the list
empty.
2016-04-22 15:53:34 +02:00
Dario Casalinuovo
76889670db shutdown_media_server: Finalize rework of synchronization
* When the user isn't requesting a custom notification, it will
be a BMediaRoster job to do it.
* Reintroduce BMediaRoster::SyncToServices, this time based on local
message passing rather than a global semaphore.
* SyncToServices is used in launch_media_server to make the process
more launch_daemon safe and faster in the average case.
* It was an error to add notifications in the media_server.
* Fixes #12717.
2016-04-21 19:02:27 +02:00
Automatic Committer
721adc92d3 Update pci.ids from pciids.sourceforge.net 2016-04-21 05:20:17 +02:00
Rene Gollent
c084d6c49a Debugger: Minor tweak.
LocalTargetHostInterface:
- Set interface's friendly name to include local hostname.
2016-04-20 20:50:02 -04:00
Rene Gollent
aed5c39d97 Debugger: Implement host interface roster listener.
TargetHostInterfaceRoster:
- Add Listener interface. For now, this simply notifies the listener of
  changes to the active debugger count.
- Adjust show new team window command to automatically fall back to the local
  interface window if one isn't specified. Fixes the Start New Team menu item
  in the TeamWindow. The latter will later be expanded to show the available
  interfaces to start a new team on in a submenu.

Debugger:
- Implement roster listener interface in order to know when to attempt
  application quit.

With this commit, all necessary work to isolate the application from the target
host is complete, and work on the actual remote interface and protocol can
begin.
2016-04-20 20:47:56 -04:00
Rene Gollent
8527cd4d28 Debugger: Add host listener implementation.
TargetHostInterfaceRoster:
- Implement TargetHostInterface's Listener interface. This allows us
  to more cheaply track the total number of running team debuggers,
  as well as automatically removing an interface that is destroyed.
2016-04-20 20:47:32 -04:00
Rene Gollent
5bb138f751 Debugger: Add listener interface for TargetHostInterface. 2016-04-20 20:47:30 -04:00
Rene Gollent
a1afac4dca Debugger: Rework to fully use TargetHostInterface.
Application objects:
- Rework and simplify to take into account that they will no longer be
  directly managing the team debugger list. Requests to start a new debugger
  are still funnelled through here however, and as such, said requests must
  now provide the appropriate target host to start with. Adjust StartTeamWindow
  and TeamsWindow accordingly.
- On global init, always create an instance of the local interface.

TargetHostInterface:
- Convert to BLooper and implement TeamDebugger's Listener interface.
  TargetHostInterfaces now directly manage their TeamDebugger instances,
  and consequently take over the equivalent duties that the main application
  previously had.
- Adjust signatures of Attach/CreateTeam to add const. Adjust
  LocalTargetHostInterface accordingly.
- Add accessor to determine if a given interface is local or not. Will be
  needed for the TeamDebugger's file manager eventually so it knows if it
  needs to request remote files if no matching local file is found.
- Add accessor to start a TeamDebugger instance, and corresponding options
  structure.

TargetHostInterfaceRoster:
- Minor adjustments to host interface initialization to take into account
  needing to start the looper.
- Add accessor for number of running team debuggers, for the main app to
  use when deciding to quit.

TeamDebugger:
- Add accessor for SettingsManager. Needed for the case of a restart request,
  as the host interfaces do not have direct access to it.

TeamsWindow:
- For now, always grab the local host interface when initializing the window.
  Once the remote interface is implemented, this will need to be adjusted, but
  the appropriate UI for creating/selecting it is needed first anyways.

With these changes, the main application is fully host-agnostic, and all
management of actual debuggers is delegated to their parent host interfaces.
There still needs to be a listener interface for the host interface and/or
roster though, so that the application can be made aware of when debuggers
quit, as this drives whether it's time to terminate the app or not.
2016-04-20 20:47:29 -04:00
Alexander von Gluck IV
52da2024d0 Revert "bluetooth: Add kit, server, and preflet to image"
This reverts commit d16a0a9fc2.
2016-04-19 22:28:16 -05:00
Alexander von Gluck IV
f0f01d2a89 bluetooth: Fix preferences build? Works here (again) 2016-04-17 15:07:41 -05:00
Alexander von Gluck IV
d16a0a9fc2 bluetooth: Add kit, server, and preflet to image
* Server not started until requested (via preflet) for now.
2016-04-17 13:39:16 -05:00
Alexander von Gluck IV
30f6fed181 bluetooth: Fix preferences build 2016-04-17 13:38:04 -05:00
Humdinger
f6ed4d08d1 Added 64bit package of youtube-dl 2016-04-17 17:54:44 +02:00
Jérôme Duval
3dc39e1e66 Add x86 packages for fontconfig, qt5, qscintilla, qsseditor. 2016-04-16 10:06:36 +02:00
Humdinger
6c70875a11 Updated youtube-dl package to 2016.04.13 2016-04-16 08:42:06 +02:00
Alexander von Gluck IV
3b0f09dbfd intel_extreme: Fix blurry native LVDS mode
* Intel panel scaling was making native mode blury
* Resolutions < native result in a non-scaled screen for now.
* We should look into using the hardware scaler vs
  doing fake scaling.
* Resolves #12716
2016-04-15 18:05:04 -05:00