linux,assembly,gdbRelated issues-Collection of common programming errors


  • dwightk
    osx mavericks homebrew linux macports
    I had been doing most of my POSIX development on something other than my Mac after upgrading from Mountain Lion to Mavericks, and when I came back, Homebrew was not functioning at a smoke-test level. All calls seemed to get an allergic reaction to characters used to identify if a file was a tar.gz:bash-3.2# brew install git /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require’: /usr/local/Library/Homebrew/extend/pathname.rb:

  • Marek Lipka
    ruby-on-rails linux gem install ubuntu-13.04
    I installed rvm and ruby 2.0.0 on my ubuntu 13.04 and everything was fine, but the last step went wrong when I install rails 4.0.0 The following is what happened after I run: ” gem install rails -v 4.0.0 “:**Building native extensions. This could take a while… ERROR: Error installing rails:ERROR: Failed to build gem native extension./home/adolph/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb creating Makefile make compiling atomic_reference.c linking shared-object atomic_reference.so make i

  • Dboy1612
    linux osx ubuntu
    I’m attempting to use Darling directly built from source on Github, I ran in to a few issues with building and dependencies, but with the help of apt-file I got through all the little problems. Now, I’m trying to run Sourcetree From Atlassian (as Wine can’t seem to handle the windows version) and am getting the following error. Would anyone happen to have an idea on why? Currently running Ubuntu 13.04 64bit.dyld: Cannot execute binary file: Failed to load native library: libSimpleWebKit.so: cann

  • aSteve
    linux wifi
    OK, I know that this isn’t going to be straightforward, but I’d really like to get it working.About 18-24 months ago, my Asus EEE 901 netbook was working fine – running Ubuntu – and I let it ‘upgrade’ as the update manager suggested. The wi-fi subsequently failed – and, while busy with other things, fiddled and ‘hosed’ the OS install. The netbook stayed in a cupboard until this weekend… when I overwrote the drives using /dev/zero – then installed a completely fresh copy of Linux Mint 12.On t

  • user3209083
    linux oracle-database
    I am trying To Install the Oracle 11g r2 on Linux 6.1 but i am Not Successful since a couple of days.When I have done all prerequisites for oracle 11 g .But When I run The Installer I got this ErrorChecking Temp space: must be greater than 80 MB. Actual 18741 MB Passed Checking swap space: must be greater than 150 MB. Actual 4095 MB Passed Checking monitor: must be configured to display at least 256 colors>>> Could not execute auto check for display colors using command /usr/

  • R..
    linux wine webcam
    Is there a version of Wine that actually runs mainstream chat clients? I’m willing to consider commercial forks. I’d need it to support at least:Yahoo QQ Skype (yes there’s a native client but it’s too outdated)all with full voice and video support. Supporting more would be nice too.Unfortunately all versions of Wine I’ve tried have either completely failed to run QQ, or botched the character encoding badly, showing Chinese correctly in some places and interpreting it as Latin-1 in other places,

  • SSH
    linux ubuntu eclipse
    I was trying to open eclipse in my ubuntu VM with the below commmand.. And as soon as I do that, I always get the below exception – ubuntu@username-dyn-vm1-48493:~$ eclipse Eclipse: An error has occurred. See the log file /home/ubuntu/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1381367113197.log.so when I went to that particular log file, this is what I can see in the log – ubuntu@username-dyn-vm1-48493:~$ more /home/ubuntu/.eclipse/org.eclipse.platform_3.8_155965261/configuration/

  • Roney Michael
    linux installation apache hadoop
    I have a POWER6 Linux Node setup as a slave in a Hadoop 1.0.4 cluster (Red Hat 4.1.2-48) Master node is RHEL node on Wintel virtual partition.On Master Sun JDK 1.6.43 is installed, and on Power slave node, IBM JDK 1.6.0 is installed.When I submit a pig script to be run on master node, it submits MAP jobs on all slave nodes and the ones on the POWER6 node fail with the following error:10 10:52:36,610 WARN org.apache.hadoop.mapred.Child: Error running child.java.lang.NullPointerExceptionat org.apa

  • Travis
    linux centos mysql
    So not sure why I am getting such error.When I type: mysql I get:ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)I know that there should be a mysql.sock file in that directory, so I create one. But the file just auto removes its self and I continue to get the error 2002.I am also unable to log into PHPMyAdmin due to the error. I can access phpmyadmin page but when logging in I get: #2002 Cannot log in to the MySQL serverEDIT:Here is my mysql

  • wullxz
    linux linux-mint wine winetricks
    I tried installing dotnet20 and msxml6 with winetricks, but both fail with different errors.It seems that dotnetfx20 isn’t available anymore at the microsoft download center. Here’s my output for the command winetricks dotnet20: LinuxSchnitzel Downloads # winetricks dotnet20 Executing w_do_call dotnet20 Executing load_dotnet20 Executing w_do_call fontfix Executing load_fontfix Setting Windows version to win2k Executing winetricks_early_wine regedit C:\windows\Temp\_dotnet20\set-winver.reg Execu

  • Neil.L
    android assembly gdb arm
    I want to use gdb to debug a helloworld c program in android, by this tutorial: http://www.kandroid.org/online-pdk/guide/debugging_gdb.html The arm-eabi-gdb, runs my helloworld successfully without breakpoint, but when I put some breakpoints and run it by ‘ni’ or ‘si’, it is said that “Program received signal SIGSEGV, Segmentation fault.” I really cannot understand…That’s my steps: 1 testmain.c & Android.mk(in cm_gingerbread/development/test2/) // testmain.c #include <stdio.h> void

  • nrz
    c linux assembly x86 x86-64
    I have been following the excellent book Programming Ground Up, wanting to learn assembly. Although not in the book at this point, I wanted to call my assembly function from C. on a 32 bit machine, this works as is when working from the book.What I do here is storing the first argument in %ebx and the second in %ecx..type power, @function .globl power power:pushq %ebpmovl %esp, %ebpsubl $4, %espmovl 8(%ebp), %ebxmovl 12(%ebp), %ecxI compile this (and the rest of the function) into

  • ktm5124
    c assembly reverse-engineering
    I wrote a simple C program that displays “Hello World!” to stdout. Then I compiled it, and deleted the source code.I have set myself to the project of patching the program in such a way that it displays something other than “Hello World!” To do this I found the string stored in the binary file, and replaced the ASCII for ‘e’ with ‘a’ at the offset in the binary (I assume it’s the data section) where the string is stored, using vi’s hex editor.I only changed one single byte of the binary, 0x65 to

  • PeeHaa
    c++ assembly linker gnu
    I’m getting a link time error:WARNING: /home/gulevich/development/camac-fedorov/camac/linux/k0607-lsi6/camac-k0607-lsi6.o (.ctors): unexpected non-allocatable section. Did you forget to use “ax”/”aw” in a .S file? Note that for example <linux/init.h> contains section definitions for use in .S files.The code causing the error (assembly in C source):# if defined(__ELF__) # define __SECTION_FLAGS “, \”aw\” , @progbits”/* writable flag needed for ld “.[cd]tors” sections bug workaround) */ #

  • maaartinus
    java assembly rotation bit-shift
    I was curious if java.lang.Integer.rotateLeft gets optimized by using a rotation instruction and wrote a benchmark for it. The results were inconclusive: It was much faster than two shifts but a bit slower than a single one. So I rewrote it in C++ and got about the same results. When compiling via g++ -S -Wall -O3 I can see the instruction in the generated assembler. My CPU is Intel Core i5.The benchmark is quite long and surely not the nicest piece of code, but I don’t think it’s broken. Or is

  • Matthew Slattery
    linux assembly x86 nasm
    I managed to build a NASM tutorial code for dealing with files. It outputs the contents of a file to stdout just fine, but when I try to access the data buffer, it contains just zeros. For example in the code below in middle loop EBX is always set to 0, when it should contain file bytes.section .databufsize dw 1024section .bssbuf resb 1024section .text ; declaring our .text segmentglobal _start ; telling where program execution should start_start:

  • RnBandCrunk
    linux ubuntu assembly macros m4
    I installed m4 from this site:http://www.geeksww.com/tutorials/libraries/m4/installation/installing_m4_macro_processor_ubuntu_linux.phpSo far so good. The package also had some examples in it. If I try to run the examples, it just brings me some errors etc.Now, I’m really a noob with ubuntu (and linux generally). I tried to run the program like this:…m4/m4-1.4.10/examples# ./exp.m4 ./exp.m4: line 1: syntax error near unexpected token “countdown’, `$1′ ./exp.m4: line 1: `define(`countdown’, `

  • h4unt3r
    linux assembly 64bit x86-64 nasm
    I’ve been toying around with x86 64 bit assembly on linux recently and after compiling a seemingly simple program I am left scratching my head :PAlthough I compile and link it throws no errors and produces a linux ELF When i try to run it I get:.:[ h4unt3r@sp3ctr4l-h0st asm ]:. #(0)> ./hello bash: ./hello: No such file or directoryI assume its producing an invalid ELF file which is why it reports hello is not there even though it IS. Not sure why– I’ll probably keep playing around with it,

  • Justin
    assembly nasm
    I thought I was starting to understand whats going on, but I’ve been spending ages now trying to understand why the following doesn’t work:org 0x7C00mov ax,0x0000 mov ds,axmov si, HelloWorldHelloWorld db ‘Hello World’,13,10,0What I’m expecting is that the mov si, HelloWorld instruction will place the value 0x7C08 in si (which is 0x7c00 + the offset of HelloWorld), ready for things like lodsb.When I build this (using Nasm) and run it (using Bochs) I find up that the end instruction actually looks

  • mezamorphic
    c++ c assembly x86 cpu
    How many different operation cycle times are there for the various x86 instructions, depending whether the data involved is float, double, int, short, long etc?I would like to be able to determine whether to avoid particular instructions on particular data types.

  • Neil.L
    android assembly gdb arm
    I want to use gdb to debug a helloworld c program in android, by this tutorial: http://www.kandroid.org/online-pdk/guide/debugging_gdb.html The arm-eabi-gdb, runs my helloworld successfully without breakpoint, but when I put some breakpoints and run it by ‘ni’ or ‘si’, it is said that “Program received signal SIGSEGV, Segmentation fault.” I really cannot understand…That’s my steps: 1 testmain.c & Android.mk(in cm_gingerbread/development/test2/) // testmain.c #include <stdio.h> void

  • Calmarius
    c++ windows memory-management gdb mingw
    I wrote my own reference counted memory manager c++ (for fun) and I’m sure it isn’t perfect 😉 . And now when I’m trying to use it I got random SIGTRAP signals. If I comment out every line which are in connection with that memory manager everything runs fine. Getting SIGTRAP-s instead of SIGSEGV is quite strange. I know that SIGTRAP-s are thrown when the program hits a breakpoint, but no breakpoint is set. I read in an other thread that debug builds of the exe’s and dll’s must be up to date. The

  • Palace Chan
    c++ memory-leaks gdb
    I have been trying to find a memory leak in a server. I leave it running and use top command to inspect the VIRT memory size field on it’s PID while I connect clients to it. I notice that every time I run something which connects to the server the field increases by about 5 MB suggesting there is a leak somewhere. I want to set a breakpoint in gdb on any call to operator new and connect a client to see if i see any calls to new from an unexpected backtrace that I haven’t already correctly inspec

  • Employed Russian
    c debugging compilation gdb
    I am getting an unexpected identifier error when I try to compile my c program with make. So, I figure the problem is simple syntax – there is a ‘{‘ somewhere it shouldn’t be. I would like to find the location of the problem with a debugger like gdb, since the program won’t compile, I can’t run it through. Is there a way to get around this?

  • nall
    c gdb
    I have a program which produces a fatal error with a testcase, and I can locate the problem by reading the log and the stack trace of the fatal – it turns out that there is a read operation upon a null pointer. But when I try to attach gdb to it and set a breakpoint around the suspicious code, the null pointer just cannot be observed! The program works smoothly without any error.This is a single-process, single-thread program, I didn’t experience this kind of thing before. Can anyone give me som

  • yvxiang
    c++ gdb opensuse
    I use openSUSE as my OS,and gdb 7.5. I want to debug my programs with gdb, with breakpoints. But when I make a breakpoint, and then run my program, gdb informs me as follows :Error in re-setting breakpoint 1: malformed linespec error: unexpected string, “.cpp”Its same in all of my programs. Also, when run to the breakpoint ,the program doesnt’ stop at all. Can any one tell me what’s wrong?I download the latest gdb and install it ,the former message is gone ,but when run gdb it tells me that :w

  • Junuxx
    gdb
    While debugging a program in GDB, I get an unexpected “program exited normally”. So I’m wondering if is there a way to find out from where (which line) the program exited. Program is multi-threaded, if that matters.

  • George Skoptsov
    c++ linux gdb
    There’s probably a silly error in my code. I have defined the following variables:unsigned char uEngines; unsigned short uActiveEngines unsigned short uDed …. and a few others.Elsewhere in the code, I tried to print the structure in the gdb and got the following .$6 = {uEngines = 12 ‘\f’, uActiveEngines = 4095 …..1) I am trying to output the uEngines value using cout, but it’s only outputting a blank space:cout <<strVariable->uEngines;2) what does ‘\f’ mean in the gdb output ?A

  • Fezter
    qgis spatial-database database gdb
    I used to work with ArcGIS. There I had geodatabases in which I could store several shapefiles with defined layer styles. Is there a way to do something similar with QGIS?The background is: we are a team of 5-10 people, and would like to save all of our spatial data in one database, so that we can use them in different QGIS projects on several workstations, and when someone changes something it will be automatically updated in all projects. Before I started here, we had many different “local” sh

  • lazyPower
    qt-creator gdb
    Everytime i go to debug some code in QTCreator, i get this GDB error returning.Current setup: Ubuntu 11.04 QT Creator version: 2.1.0 GDB Version: GNU gdb (Ubuntu/Linaro 7.2-1ubuntu11) 7.2Debugging starts &”warning: GDB: Failed to set controlling terminal: Invalid argument\n”I’ve also tried debugging from CLI with the following results:charles@virtubuntu:~/Documents/it327/Day3/Lab1-build-desktop$ qtcreator -debug Lab1 Warning: HANDLE RUNCONTROL START FAILED (no active run control) UNEXPECTED

Web site is in building