dump

How do I dump an arbitrary struct in C?

狂风中的少年 提交于 2019-12-07 03:22:48
问题 I don't know which direction to go,perhaps something like reflection will help? 回答1: The answer of @Kerrek SB works realy well, I just post how to use it in a function using a void pointer. int dump(void *myStruct, long size) { unsigned int i; const unsigned char * const px = (unsigned char*)myStruct; for (i = 0; i < size; ++i) { if( i % (sizeof(int) * 8) == 0){ printf("\n%08X ", i); } else if( i % 4 == 0){ printf(" "); } printf("%02X", px[i]); } printf("\n\n"); return 0; } int main(int argc,

Java threads waiting to lock object that isn't (visibly) locked

半世苍凉 提交于 2019-12-07 03:01:14
问题 Normally when I ask for a thread dump, the symptoms of a poorly performing system are easily explained; i.e. normally I would be able to see that a number of threads are clearly waiting on a monitor which has been acquired but not released by another. In this case, I have a lot of threads waiting for a monitor (0x965ad100), but none appears to have that monitor in the first place. The threads in question can be identified with this signature: waiting to lock <0x965ad100> (a uk.gov.dti.og.fox

Compare heap dump (HPROF) files

谁说我不能喝 提交于 2019-12-06 18:39:29
问题 Is it possible to compare two HPROF files? How? 回答1: From what I found you can compare only histograms of object. For this go to "Histogram" view, then click "Compare to another Heap Dump" and select another hprof file. Here is screenshot: 来源: https://stackoverflow.com/questions/6241965/compare-heap-dump-hprof-files

Can I selectively create a backup of Postgres database, with only certian tables?

眉间皱痕 提交于 2019-12-06 10:18:40
问题 Can I programatically(or whichever way works fine) create the backup of a database, with only the tables I want? I have around 100 tables in my database and I want only 10 tables backup(ofcourse all are interdependant). How can I achieve this? And by the way I have a postgresql database. 回答1: Of course. pg_dump lets you pass list of tables with parameter -t To clear some doubts. True, the -t parameter accepts only one pattern. But it's a pattern very similar to regular expression, so if you

Java forced thread dump programmatically - like “jstack -F -l <PID>”

泄露秘密 提交于 2019-12-06 09:50:14
I am trying to do a forced java thread dump programmatically, just like the command jstack -F -l <PID> would do it. My best attempt: I created a subclass from sun.jvm.hotspot.tools.JStack overwriting run() with the following code analogous to sun.jvm.hotspot.tools.JStack.run() but in the last line calling start(printstream) instead of start() : StackTrace stacktrace = new StackTrace(mixedMode, concurrentLocks); try { Class<?> stacktraceTool = stacktrace.getClass().getSuperclass(); Method stacktraceSetAgent = stacktraceTool.getDeclaredMethod("setAgent", new Class<?>[] { BugSpotAgent.class });

backup mysql tables with php

给你一囗甜甜゛ 提交于 2019-12-06 09:06:32
问题 I would like to backup tables (with PHP) from a db if the table prefix is matching with a sub string. What I was trying and is not working error_reporting(1); $dbname = 'wp_dev'; if (!mysql_connect('127.0.0.1', 'root', '')) { echo 'Connection Error'; exit; } $sql = "SHOW TABLES FROM $dbname LIKE 'wp_%'"; $result = mysql_query($sql); if (!$result) { echo "DB tables could not be listed\n"; echo 'MySQL Fehler: ' . mysql_error(); exit; } while ($row = mysql_fetch_row($result)) { echo "<pre>Table:

Dump a mysql embedded database into a SQL text file [closed]

穿精又带淫゛_ 提交于 2019-12-06 05:05:13
Closed . This question needs to be more focused . It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 9 months ago . I have a mysql embedded database that I need to move into server. I know that for a server I can use mysqldump to backup the data into a SQL text file. But what option do I have for a embedded database? Thanks, Carlos. I managed to dump the embedded schema. I got it from a Amarok tips page libmysqld.dll enables to use mysql in your program without setting up a server or load a

Searching for (freeware) database migration tool [closed]

懵懂的女人 提交于 2019-12-06 04:46:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I'm searching for a tool to dump a database including DDL and content as plain SQL-Sсript, so that it can be archived in a plain text format. I know e.g. the Oracle dump tools or MySQL dump, but is there a tool which can connect to different data sources and get the job done? GUI would be great. 回答1: Check out

How to get output from gdb.execute in PythonGDB (GDB 7.1)?

痴心易碎 提交于 2019-12-06 00:54:22
问题 I'm currently writing a Python GDB script. The problem is that it has to be compatible with GDB 7.1. So I first wrote the script for GDB 7.3.1 and used the following function to receive the output of an gdb command (GDB 7.3.1): myvar = gdb.execute("info target", False, True) The last parameter of this function is that it should return the result as a string (which makes perfectly sense; why else would I execute such a command ;) ) In GDB Version 7.1 though it seems that the last parameter isn

In windbg, what can cause the message “WARNING: Unable to verify timestamp for mydll.dll”?

我的未来我决定 提交于 2019-12-05 23:02:23
问题 I have a dump (created by SysInternal's procdump ) and when I ask to view the call stack of a thread I get the error: "WARNING: Unable to verify timestamp for mydll.dll" I own the source code for mydll.dll and I have the PDB file for it, the call stack seems valid but I would like to know what can be the cause of the message. In the past I did not get that warning message. Thank you. 回答1: The reason might be that you don’t have the the binary for your mydll.dll available. Try to either put it